The Bruised Edge

Experiments in software, media, craft, and life

Kevin S. Clarke


Copying Nested Files

A one-liner for copying nested files with a specific extension to a new location:

find /tmp/AudioBooks -type f -name "*.m4b" -exec cp {} ~/AudioBooks ;

The example will find all the .m4b files in /tmp/AudioBooks and copy them into ~/AudioBooks. If there are subdirectories, the files within those will be copied, too.