To sync all of the mp3 files from a path (pwd) to another location, you can run this first to test to see what would copy:

find -ctime -60 -name "*.mp3" -print0 | rsync -aucvn --files-from=- --from0 ./ /path/to/destination/

Then remove the “n” from the rsync flags to copy, archive style, all files with update on crc32 of the files:

find -ctime -60 -name "*.mp3" -print0 | rsync -aucv --files-from=- --from0 ./ /path/to/destination/

This is very useful if you want a single command to copy over new contents of a folder to another folder. Rsync for the win!

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.