cheat/:
James Zhu 57e2b388fe mod
2014-10-09 10:05:46 +08:00

13 lines
618 B
Plaintext

# copy files from remote to local, maintaining file propertires and sym-links (-a), zipping for faster transfer (-z), verbose (-v).
rsync -avz host:file1 :file1 /dest/
rsync -avz /source host:/dest
# Copy files using checksum (-c), rather than time, to detect if the file has changed. (Useful for validating backups).
rsync -avc /source/ /dest/
# Copy contents of /src/foo to destination:
# for below command, If doesn't specify the destination foo, then it will create foo in /dest
rsync -auv /src/foo /dest
# for below command, It will copy the contents of /src/foo/ to /dest/foo
rsync -auv /src/foo/ /dest/foo