rsync

How to Use rsync with Examples

How to Use rsync with Examples
Rsync is a popular tool for file syncing, both locally and remotely. Unlike other syncing tools, rsync uses an interesting algorithm that minimizes bandwidth consumption. It simply moves the portion of the file(s) that have changed.

It's a powerful utility that can serve in lots of situations. In this article, I'll showcase how to get started with rsync with a demonstration. The demonstration will be performed on Ubuntu 18.04.

Rsync

Rsync stands for the term remote sync. Despite the name, it can handle file synchronization remotely and locally. The term rsync is also used to refer to the rsync protocol that rsync uses for syncing. In this article, rsync will always denote the tool, not the protocol.

Because of its sheer popularity, rsync is available on almost every single Linux and UNIX-like system. There's a good chance that it comes pre-installed. If not, do a little research on how to install rsync in your system.

Here's a shortlist of features rsync offers.

Rsync usage

Before jumping into rsync, we need some dummy files to work with. Let's create a dummy directory first.

$ mkdir -v primary

Once created, it's time to create a handful of dummy files. To create a file, I'll be using the touch command. Learn more about the touch command.

$ touch dummy1… 20

Voila! We're now ready to use rsync to perform actions using these dummy files.

Rsync Command structure

Rsync uses the following command structure.

$ rsync
AppyMouse On-screen Trackpad and Mouse Pointer for Windows Tablets
Tablet users often miss the mouse pointer, especially when they are habitual to using the laptops. The touchscreen Smartphones and tablets come with m...
Middle mouse button not working in Windows 10
The middle mouse button helps you scroll through long webpages and screens with a lot of data. If that stops, well you will end up using the keyboard ...
How to change Left & Right mouse buttons on Windows 10 PC
It's quite a norm that all computer mouse devices are ergonomically designed for right-handed users. But there are mouse devices available which are s...