As part of transitioning from using an old desktop to a new desktop (while both are still active), I found the 'rsync' command to be very useful. Here is the options I ended up using to accomplish my goal of copying over (old) files from the old machine to the new without wiping out any new files on the new machine:
rsync -avzuhP --log-file=/destination/dir/rsync_log.txt -e ssh remoteuser@remotehost:/source/dir /destination/dir/
Here's what the options do:
-a archive
-v verbose
-z compress
-u update <= Do Not Overwrite the Modified Files at the Destination
-h human-readable
-P progress bar/partial transfers
Note that these options are turned on in '-a' archive mode:
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-p, --perms preserve permissions
-t, --times preserve times
-g, --group preserve group
-o, --owner preserve owner (super-user only)
-D same as --devices --specials
Dr. Weeks is a Professor of Human Genetics and Biostatistics at the University of Pittsburgh. His research focuses on statistical human genetics in the area of mapping susceptibility loci involved in complex human diseases. The content on this blog is for informational purposes only - use at your own risk!
No comments:
Post a Comment