rsync: update page (#11375)

* rsync: update page 

---------

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
Harry Han
2023-11-04 16:43:03 +00:00
committed by K.B.Dharun Krishna
parent 0638b8d95d
commit 4bf7d6eb4c

View File

@@ -1,14 +1,14 @@
# rsync # rsync
> Transfer files either to or from a remote host (but not between two remote hosts), by default using SSH. > Transfer files either to or from a remote host (but not between two remote hosts), by default using SSH.
> To specify a remote path, use `host:path/to/file_or_directory`. > To specify a remote path, use `user@host:path/to/file_or_directory`.
> More information: <https://download.samba.org/pub/rsync/rsync.1>. > More information: <https://download.samba.org/pub/rsync/rsync.1>.
- Transfer a file: - Transfer a file:
`rsync {{path/to/source}} {{path/to/destination}}` `rsync {{path/to/source}} {{path/to/destination}}`
- Use archive mode (recursively copy directories, copy symlinks without resolving and preserve permissions, ownership and modification times): - Use archive mode (recursively copy directories, copy symlinks without resolving, and preserve permissions, ownership and modification times):
`rsync --archive {{path/to/source}} {{path/to/destination}}` `rsync --archive {{path/to/source}} {{path/to/destination}}`
@@ -24,9 +24,9 @@
`rsync --recursive {{path/to/source}}/ {{path/to/destination}}` `rsync --recursive {{path/to/source}}/ {{path/to/destination}}`
- Recursively copy directories, use archive mode, resolve symlinks and skip files that are newer on the destination: - Use archive mode, resolve symlinks and skip files that are newer on the destination:
`rsync --recursive --archive --update --copy-links {{path/to/source}} {{path/to/destination}}` `rsync --archive --update --copy-links {{path/to/source}} {{path/to/destination}}`
- Transfer a directory to a remote host running `rsyncd` and delete files on the destination that do not exist on the source: - Transfer a directory to a remote host running `rsyncd` and delete files on the destination that do not exist on the source: