|
|
How to use 'cp' as a simple but reliable backup tool
I think cp with these options will overlook changed files, my favorite for stuff like this is rsync. Here's my cheatsheet for rsync, read the man page for it though...
rsync -avhP source destination a=archive, v=verbose, h=human readable, P=save intermediate Partial files (--partial) and give you Progress (--progress) A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the containing directory on the destination. In other words, each of the following commands copies the files in the same way, including their setting of the attributes of /dest/foo: rsync -avhP /src/foo /dest copies "foo" itself to /dest directory creating a foo subdirectory rsync -avhP /src/foo/ /dest/foo copies "foo/*" to /dest directory implicitely forcing the creation of "foo" at the destination rsync -avhP /src/foo/ /dest puts the contents of foo into /dest with no "foo" directory |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.15 seconds |
|