-
Notifications
You must be signed in to change notification settings - Fork 20
Unix
Gabor Szarnyas edited this page May 17, 2022
·
1 revision
Rsync has two major modes of operation. The modes are dependent on the absence or presence of the trailing slash on the source directory. Remember: source directory. Trailing slash on the destination directory doesn't matter.
Copy the source directory to the destination (this is the recommended mode; see note below).
rsync -a --delete /home/mst3k /backup/
Copy the contents of the source directory into the destination.
rsync -a --delete /home/mst3k/ /backup/
If the source_file ends in a /, the contents of the directory are copied rather than the directory itself.
You should not put a trailing slash on the source directory
Use trailing slashes on destination directory