You should be fine as long as you don't add --delete.

I would start with rsync -vai --dry-run SOURCE/ TARGET/
Add whatever the OSX specific option is (I think -E)

Yes, --dry-run shows you what it would have done without --dry-run and
yes, if you can't read all the files then you need to run it as root.

On 02/22/2017 08:57 AM, David Epstein wrote:
> All the files and directories I want to talk about are on the same machine (a 
> Mac).  I have a directory that I will call SOURCE. This contains a a number 
> of files, some of which are directories containing further files. I want to 
> copy these files to another directory, which I will call TARGET. Please 
> assume that SOURCE and TARGET include absolute path-names. I think they 
> should also end in a slash (subject to correction).
> If a top-level file/directory is present in TARGET, but not in SOURCE, I do 
> not want it to be disturbed.
> If a top-level file/directory is not present in TARGET, but is present in 
> SOURCE, I want it to be recursively copied into TARGET
> If a top-level file/directory is present in TARGET and also present in 
> SOURCE, I want it to overwrite, so that the ccorresponding file/directory in 
> TARGET at the end of the rsync job is a copy of what is in SOURCE, with the 
> same permissions and date-stamps.
> Since it’s on a Mac, I also want to transfer extended attributes.
> I would be grateful for the recommended recipe. 
> Would dry-run tell me what rsync proposed to delete as well as what it 
> proposed to install. It’s because I don’t understand the option dry-run fully 
> that I’m reluctant to use trial-and-error to get to the right command.
> I think I would have to use “sudo” since some of the files are not readable 
> by me when I am an ordinaty user.
> Thanks

        Kevin Korb                      Phone:    (407) 252-6853
        Systems Administrator           Internet:
        FutureQuest, Inc.       (work)
        Orlando, Florida       (personal)
        Web page:             
        PGP public key available on web site.

Attachment: signature.asc
Description: OpenPGP digital signature

Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options:
Before posting, read:

Reply via email to