I was doing a little organizing of my home directory and needed a quick way to move all of my .pdf files into my Documents/PDF folder. It’s where I keep all PDFs for easy organization. Receipts, financial documents, e-books, etc. Here’s a quick way to find ALL of a file type (recursively of course) and move (or copy if you prefer) to another directory.

$ find /home/username/ -iname “*.pdf*” -exec mv {} /home/cklosowski/Documents/pdfs/ ;

Again you could also cp instead of mv if you prefer (would end up with duplicates however) by changing it to read:

$ find /home/username/ -iname “*.pdf*” -exec cp {} /home/cklosowski/Documents/pdfs/ ;

Posted by Chris Klosowski

Chris Klosowski is the Director of Technology at Sandhills Development, LLC, creators of fine WordPress plugins, and ecommerce solutions.

One Comment

  1. I read this paragraph completely on the topic of the difference of most recent and earlier technologies, it’s
    awesome article.


Leave a reply

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