Synching tips and other snippets
Synching modified files to a differnet directory
$ rsync -avh --itemize-changes --progress --stats --compare-dest=destination_dir/ original_dir/ usb/dir/
e.g. To a USB for transfer from a remote server!
$ rsync -avh --itemize-changes --progress --stats --compare-dest=/myremotedata/ /mydata/ /usb/newdata/
The above command will synch files in /mydata
with /myremotedata
. New and changed files will be copied to /usb/newdata
instead of being sent to /myremotedata
.
This enable us to transport the changed and added files on the local USB to the remote server, saving time and bandwidth!
Synching times of files with same file tree
$ cd /path/to/old/directory
$ find . -exec touch "/path/to/new/directory/{}" --reference "{}" \;
Checking which META file for rtotrrent hast text/title
$ ~/casper$ grep -irE hawaii *.meta
Sources:
Synching File Modify Times
rsync changes to another directory
Find All Empty Files Command