what to see what cpio would do without writing

I have two similar directories and I want to compare them to see what would be copied.

Normall I would cd to a dir and then just run the command:

find . -print | cpio -pdvm /foo/bar

but I cannot recall and worse find in the man to set cpio to read-only -- meaning just show me what it would have done. My memory tells me that I used to be able to do this. But I might have dreamt it since I cannot recall the last time I actually used that option.

The OS today is OS X 10.8.2
bs98909Asked:
Who is Participating?
 
MikeOM_DBAConnect With a Mentor Commented:
You could also use the "dry run" option of rsync:
rsync -nrv directory_origin directory_destination

Open in new window

:p
0
 
arnoldConnect With a Mentor Commented:
I do not believe cpio has a no-action mode.

You might be thinking of diff

Diff -BruN directory_origin directory_destination
The output will be a what changes need to be made to the origin directory contents to make it identical to the destination one.
Files should be regular files.

If you run the cpio you included, you will output the list of files that are copied.
0
 
bs98909Author Commented:
Sorry for long delay -- holidays got in the way

both the diff and rsync would have worked -- but the rsync is more of what I was looking for

must have dreamt the cpio part
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.