rsync

file managementLinux/Unix
The rsync command is one of the most frequently used commands in Linux/Unix-like operating systems. rsync Sample fallback description for rsync

Quick Reference

Command Name:

rsync

Category:

file management

Platform:

Linux/Unix

Basic Usage:

rsync [options] [arguments]

Common Use Cases

  • 1

    File synchronization

    Synchronize files and directories between systems

  • 2

    Backup

    Create backups of important files and directories

  • 3

    Data migration

    Move files between systems or locations

  • 4

    Scripting

    Use in shell scripts to automate file synchronization

Syntax

rsync [OPTION]... [FILE]...

Options

Option Description
-l Use a long listing format
-a Show hidden entries starting with .
-h Human-readable sizes
-R List subdirectories recursively

Examples

How to Use These Examples

The examples below show common ways to use the rsync command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

Basic Examples:

ls
List files in the current directory.
ls -l
List files in long format with details.
ls -a
List all files including hidden ones.

Advanced Examples:

ls -lah Detailed list with human-readable sizes. ls -R List directories recursively.

Try It Yourself

Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

Understanding Syntax

Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

Notes

These are sample notes for the rsync command.

Tips & Tricks

1

Use the -a option to archive mode

2

Use the -v option to increase verbosity

3

Use the -z option to compress file data during the transfer

4

Use the -e option to specify the remote shell program

5

Use the -P option to show progress during transfer

Common Use Cases

File synchronization

Synchronize files and directories between systems

Backup

Create backups of important files and directories

Data migration

Move files between systems or locations

Scripting

Use in shell scripts to automate file synchronization

File management

Manage files and directories in the filesystem

Related Commands

These commands are frequently used alongside rsync or serve similar purposes:

Use Cases

1

File synchronization

Synchronize files and directories between systems

2

Backup

Create backups of important files and directories

3

Data migration

Move files between systems or locations

4

Scripting

Use in shell scripts to automate file synchronization

5

File management

Manage files and directories in the filesystem

Learn By Doing

The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the rsync command works in different scenarios.

$ rsync
View All Commands