We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

nate63179 on 11/03/09


Tagged

Bash rsync sync


Versions (?)


Rsync: sync local files to remote


Published in: Bash 


Simple rsync command to synchronize two directories.

Other useful options

-h, --human-readable -C, --cvs-exclude = excludes common source file endings --delete -z, --compress --exclude=PATTERN --compare-dest=DIR This option instructs rsync to use DIR on the destination machine as an additional hierarchy to compare destination files against doing transfers (if the files are missing in the destination directory). If a file is found in DIR that is identical to the sender's file, the file will NOT be transferred to the destination directory. This is useful for creating a sparse backup of just files that have changed from an earlier backup.

  1. rsync --progress --compress --recursive small_thumbs nate@somesite.com:foodir # copy recursive, with progress print out
  2. rsync -rz --progress small_thumbs nate@somesite.com:foodir # same, in short hand

Report this snippet 

You need to login to post a comment.