Solved

what to see what cpio would do without writing

Posted on 2012-12-24
3
549 Views
Last Modified: 2012-12-31
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
0
Comment
Question by:bs98909
3 Comments
 
LVL 76

Assisted Solution

by:arnold
arnold earned 50 total points
Comment Utility
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
 
LVL 29

Accepted Solution

by:
MikeOM_DBA earned 100 total points
Comment Utility
You could also use the "dry run" option of rsync:
rsync -nrv directory_origin directory_destination

Open in new window

:p
0
 

Author Closing Comment

by:bs98909
Comment Utility
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now