Update cheatsheets

This commit is contained in:
ivuorinen
2024-06-04 00:14:12 +00:00
parent cdeb1d6bc9
commit c4f575222c
33 changed files with 232 additions and 151 deletions

View File

@@ -15,28 +15,28 @@ source: https://github.com/tldr-pages/tldr.git
- 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 {{-a|--archive}} {{path/to/source}} {{path/to/destination}}`
- Compress the data as it is sent to the destination, display verbose and human-readable progress, and keep partially transferred files if interrupted:
`rsync --compress --verbose --human-readable --partial --progress {{path/to/source}} {{path/to/destination}}`
`rsync {{-zvhP|--compress --verbose --human-readable --partial --progress}} {{path/to/source}} {{path/to/destination}}`
- Recursively copy directories:
`rsync --recursive {{path/to/source}} {{path/to/destination}}`
`rsync {{-r|--recursive}} {{path/to/source}} {{path/to/destination}}`
- Transfer directory contents, but not the directory itself:
`rsync --recursive {{path/to/source}}/ {{path/to/destination}}`
`rsync {{-r|--recursive}} {{path/to/source}}/ {{path/to/destination}}`
- 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 --archive --update --copy-links {{path/to/source}} {{path/to/destination}}`
`rsync {{-auL|--archive --update --copy-links}} {{path/to/source}} {{path/to/destination}}`
- Transfer a directory from a remote host running `rsyncd` and delete files on the destination that do not exist on the source:
`rsync --recursive --delete rsync://{{host}}:{{path/to/source}} {{path/to/destination}}`
`rsync {{-r|--recursive}} --delete rsync://{{host}}:{{path/to/source}} {{path/to/destination}}`
- Transfer a file over SSH using a different port than the default (22) and show global progress:
`rsync --rsh 'ssh -p {{port}}' --info=progress2 {{host}}:{{path/to/source}} {{path/to/destination}}`
`rsync {{-e|--rsh}} 'ssh -p {{port}}' --info=progress2 {{host}}:{{path/to/source}} {{path/to/destination}}`