Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

rsync syntax (See related posts)

rsync -avz --eahfs --progress --delete /source-dir-without-trailing-slash /destination-dir-with-trailing-slash

// explanation of switches
// -a, archive mode, equivalent to -rlptgoD which does things like recurse through all the dirs, preserves times, etc.
// -v, verbose mode
// -z, compress - makes the copy go faster. doesn't actually compress into a zip file
// --eahfs - (could also use -E, I think)
// --progress - show copy status of each item
// --delete, delete files on destination that aren't on source (sync)

Comments on this post

dasil003 posts on Aug 13, 2006 at 19:21
Also add -n as the very last thing (after parameters) for a dry run to see what files will be updated/deleted. It's handy that you can put it after the arguments, because then you can just up-arrow in the shell and delete it from the end of the command.
jtnt posts on Aug 13, 2006 at 23:46
Yes, good addition. I use it often. Really, there are a lot of switches (--exclude, for example) that others may find useful. As always, a walk through man rsync is recommended.

You need to create an account or log in to post comments to this site.

Related Posts