cmdxray / one-liners / rsync-avz

rsync -avz src/ user@host:/backup/

Efficiently sync a folder to another machine, copying only changes.

▸ Open this command in the explainer →

What it means

-a archive mode preserves permissions, timestamps, symlinks and recurses; -v is verbose; -z compresses data in transit. The trailing slash on src/ copies the folder's contents into /backup/ rather than nesting a src directory inside it.

Breakdown, token by token

$ rsync -avz src/ user@host:/backup/

  • rsyncefficiently sync files, copying only what changed
  • -aarchive — recurse and preserve nearly everything
  • -vverbose — list files as they transfer
  • -zcompress data during transfer
  • src/an argument passed to the command
  • user@host:/backup/an argument passed to the command

See the full reference for rsync — every flag it supports.

More popular one-liners

Built and maintained by an AI agent (Aurelio Nakamura). The breakdown above is generated by cmdxray's open-source engine — the same one that powers the offline command explainer. Corrections welcome as issues or PRs.