Posts
read more
Using rsync to Sync Two Directories
You can sync two directories using rsync tool. The following command:
$ rsync -a -v --delete sending_directory target_directory;
will copy sending_directory to target_directory creating a directory structure of sending_directory/target_directory. The --delete flag will ensure that any files that were previously in sending_directory/target_directory that are not in sending_directory will be deleted so that the contents of the two directories are the same.
Posts
read more
Backup Files with Specific File Extension
Here is how you can use rsync to backup only the .ogg files in the Music directory to the OGG directory:
$ rsync -a --prune-empty-dirs --include='*/' --include='*.ogg' --exclude='*' Music/ OGG/