rsync Cheatsheet - File Synchronization Commands | Online Free DevTools by Hexmos

Master rsync commands with this cheatsheet. Learn to sync folders, transfer files over SSH, and exclude directories efficiently. Free online tool for developers.

rsync Cheatsheet

rsync Command Line Synchronization

This cheatsheet provides essential rsync commands for efficient file synchronization and transfer. rsync is a powerful utility for copying and synchronizing files and directories locally or remotely.

Sync Folder to Destination

Sync folder in-progress to final:

rsync -avz ./in-progress /final

Sync Folder Contents

Sync the content from in-progress to final (note the trailing slash):

rsync -avz ./in-progress/ /final

Exclude Directories During Sync

Sync the content from in-progress to final and exclude the contents from in-progress/junk/:

rsync -avz --exclude=junk/* ./in-progress/ /final

Rsync Over SSH

Transfer files from a local directory to a remote server via SSH:

rsync -avz /var/www/ user@1.2.3.4:/var/www/

Additional Resources

For more detailed examples and advanced usage, refer to the following resource: