cmdxray / commands / rsync

What does rsync do?

efficiently sync files, copying only what changed.

▸ Explain your own rsync command →

rsync examples, explained

$ rsync -avz --delete src/ dest/

  • rsyncefficiently sync files, copying only what changed
  • -aarchive — recurse and preserve nearly everything
  • -vverbose — list files as they transfer
  • -zcompress data during transfer
  • --deletedelete files on the destination that are gone from the source
  • src/an argument passed to the command
  • dest/an argument passed to the command

$ rsync -a --dry-run a/ b/

  • rsyncefficiently sync files, copying only what changed
  • -aarchive — recurse and preserve nearly everything
  • --dry-runshow what would happen, change nothing
  • a/an argument passed to the command
  • b/an argument passed to the command

rsync flags & options

-aarchive — recurse and preserve nearly everything
-vverbose — list files as they transfer
-zcompress data during transfer
-rrecurse into directories
-Pshow progress and keep partial files
-ndry run — show what would happen, change nothing
-uskip files that are newer on the destination
-euse the given remote shell (e.g. ssh)
--deletedelete files on the destination that are gone from the source
--excludeskip files matching this pattern
--progressshow a progress bar during transfer
--dry-runshow what would happen, change nothing

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.