Solved

what to see what cpio would do without writing

Posted on 2012-12-24
3
558 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 78

Assisted Solution

by:arnold
arnold earned 50 total points
ID: 38718589
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
ID: 38733265
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
ID: 38733589
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

739 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