A very useful Linux terminal command is ‘rsync’. rsync is a powerful and versatile utility for synchronizing files and directories between two locations, either locally or over a network. It’s commonly used for backups, mirroring, and copying files efficiently.
/source/path/ directory to the /destination/path/ directory.)
Remote File Synchronization: (This command synchronizes files from a remote host to a local directory using SSH for secure transmission.)
…and vice versa:
Advanced Usage:
Delete Extraneous Files: (This deletes any files in the destination directory that are not present in the source directory.)
Bandwidth Limitation: (Limits the bandwidth used by rsync to 1000 KB/s.)
Dry Run: (Simulates the synchronization process without making any changes. Useful for testing.)
Show Progress: (Displays a progress bar indicating the status of the synchronization.)
Uses for rsync:
- Backup: Create incremental backups of files and directories.
- File Mirroring: Keep two directories identical, ensuring data consistency.
- Data Migration: Transfer files and directories between servers or storage devices.
- Remote Sync: Synchronize files between local and remote systems securely.
rsync is an incredibly versatile and efficient tool for managing file synchronization tasks, making it an essential command-line utility for Linux users.