rsync

Fast, resumable file synchronization tool — local or over SSH.

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

rsync transfers only changed file blocks (delta transfer) making it extremely efficient. -a preserves permissions, timestamps, symlinks, and ownership. --delete mirrors the source exactly. Always test with -n (dry-run) first.

Common flags
FlagMeaning
-a --archiveArchive: recursive + preserve perms, times, symlinks, owner
-v --verboseShow transferred files
-z --compressCompress data during transfer
--progressShow per-file progress during transfer
--deleteDelete destination files not in source (mirror mode)
--excludeExclude files matching a pattern
-n --dry-runSimulate without actually transferring
Examples
rsync -avz --progress /var/www/ user@host:/var/www/Sync web root to remote server with progress display · explain & risk-check →
rsync -av --delete --exclude='.git' /project/ /backup/Mirror project directory excluding .git · explain & risk-check →
rsync -avn /src/ /dst/Dry-run to preview what would sync before committing · explain & risk-check →
Pro tip

Always test with `rsync -avn` (dry run) before using `--delete`. One typo in the source path could wipe your entire destination.

Related
scp tar rclone ssh
Open the full explainer →More in Files & Archives

Reference text is hand-written and may be incomplete — check man rsync for your version. Test destructive commands on a non-production system first.