rsync

GNU Rsync Cheatsheet #

GNU rsync is a utility for efficiently transferring and synchronizing files between a computer and a remote server or between two computers.

Basic Commands #

Command/OptionExampleDescription
rsync -avrsync -av source/ destination/Archive mode with verbose output (-a for archive, -v for verbose)
rsync -zrsync -z source/ destination/Compress file data during the transfer (-z for compression)
rsync -rrsync -r source/ destination/Recursively transfer directories (-r for recursive)
rsync -ersync -e ssh source/ user@remote:/path/Specify the remote shell to use (-e for remote shell)
rsync -ursync -u source/ destination/Skip files that are newer on the destination (-u for update)
rsync -nrsync -n source/ destination/Perform a dry run (no changes are made) (-n for dry run)
rsync --deletersync --delete source/ destination/Delete extraneous files from the destination (--delete option)
rsync -Prsync -P source/ destination/Show progress during transfer and handle partial transfers (-P for progress and partial)

Advanced Options #

Command/OptionExampleDescription
rsync --excludersync --exclude='*.tmp' -av source/ destination/Exclude files matching a pattern from being transferred (--exclude option)
rsync --includersync --include='*.jpg' --exclude='*' -av source/ destination/Include only files matching a pattern (--include option)
rsync --partialrsync --partial source/ destination/Keep partially transferred files (--partial option)
rsync --bwlimitrsync --bwlimit=1000 -av source/ destination/Limit bandwidth used during the transfer (--bwlimit option)
rsync --chownrsync --chown=user:group source/ destination/Change ownership of transferred files (--chown option)
rsync --checksumrsync --checksum -av source/ destination/Use file checksums to determine changes (--checksum option)
rsync --log-filersync --log-file=rsync.log -av source/ destination/Log transfer details to a file (--log-file option)

This cheatsheet covers the essential GNU rsync commands and options for file synchronization and transfer.

rsync

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.