Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: March 18, 2024
Remote Sync (rsync) is a utility for copying and synchronizing files and directories across networked systems.
When using rsync, we may want to have the option to ignore specific file properties (like ownership, modification time, group, and permissions) when copying files. In this tutorial, we’ll learn how to add particular options to rsync to make it ignore several file properties.
When adding archive mode (-a) to rsync, we tell rsync that we want recursion and want to preserve almost everything (excluding hard links).
However, if we want to exclude more file properties, we can specify them using the –no-OPTION switches:
$ rsync -a --no-OPTION [source files and directories] [destination]
We can specify the –no-OPTION property as:
For example, the following command will copy file1.txt to /home/user/Downloads/Temp, but it’ll ignore its group:
$ rsync -a --no-group file1.txt /home/user/Downloads/Temp/
In this short tutorial, we learned how to add particular options to rsync to make it ignore specific file properties.