Rsync: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
== Common Options == | == Common Options == | ||
<code> -a </code> - Combo flag, same as -rlptgoD (recursive; copies symlinks; preserve: permissions, modification times, group, and owner; device | <code> -a </code> - Combo flag, same as -rlptgoD (recursive; copies symlinks; preserve: permissions, modification times, group, and owner; device/special) | ||
<code>dir</code> vs <code>dir | <code>dir</code> vs <code>dir/</code>:<br /> | ||
<code>dir</code> - Copy the directory<br /> | <code>dir</code> - Copy the directory<br /> | ||
<code>dir | <code>dir/</code> - Copy the contents of the directory | ||
== Sync Directories on the same computer == | == Sync Directories on the same computer == | ||
<code>rsync -a dir1 | <code>rsync -a dir1/ dir2</code> - Copies the contents of dir1 into dir2 | ||
Revision as of 19:04, 27 February 2017
rsync copies files and directories. It is often used for backups, or duplicating directory contents on a remote server. rsync can copy only changed files, and can use SSH to securely copy the file.
Common Options
-a
- Combo flag, same as -rlptgoD (recursive; copies symlinks; preserve: permissions, modification times, group, and owner; device/special)
dir
vs dir/
:
dir
- Copy the directory
dir/
- Copy the contents of the directory
Sync Directories on the same computer
rsync -a dir1/ dir2
- Copies the contents of dir1 into dir2