Network

rsync

Fast, versatile remote and local file-copying tool with delta transfer.

Synopsis

syntax
rsync [OPTION]... SOURCE DEST

Examples

Sync directories locally
rsync -avz src/ dest/
Sync to remote over SSH
rsync -avz -e ssh local/ user@host:/remote/
Mirror source to dest, deleting extras
rsync -avz --delete src/ dest/
Transfer with progress bar
rsync -avz --progress large.iso user@host:/data/
Dry run to preview changes
rsync -avzn src/ dest/

Common options

FlagDescription
-aArchive mode (recursive, preserves symlinks, permissions, times)
-vVerbose
-zCompress during transfer
--deleteDelete files in dest that don't exist in source
--progressShow transfer progress
-eSpecify remote shell (e.g. 'ssh -p 2222')
--dry-runShow what would be transferred

About rsync

The `rsync` command fast, versatile remote and local file-copying tool with delta transfer. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.

Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 7 commonly used flags shown above, though the full set of options is available in the man page (`man rsync`).

The 5 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Network Commands

Other commands in the Network category

Related tools