Monthly Archives: December 2011

Finding and copying files in Bash

Another useful tip to store away, the find command lets you find files and you can use the xargs command to copy them somewhere else, simply the pipe the output from find into xargs:

find /media/cdrom/ -name '*27918*' | xargs -i cp {} ~/Desktop/

This then copies anything with 27918 in the title to your desktop, which is much quicker than searching through every file on the cdrom for example.