- July 2010 (1)
- June 2010 (4)
- May 2010 (3)
- April 2010 (6)
- March 2010 (6)
- February 2010 (8)
- January 2010 (13)
- December 2009 (4)
- October 2009 (2)
- September 2009 (1)
Find JPG Files in Directory and CP (copy) to another directory
Today I was faced with the challenge of finding all the JPG files in a a directory (and subdirecties of that) and copying them to another directory (striping out the subdirectory folder name).
find /path/to/directory/ -iname "*.jpg" -exec cp '{}' /path/to/dest/dir/ \;That did it perfectly.
Keywords
Find Folder Strip Path Copy cp directory
Reference:
http://www.linuxquestions.org/questions/linux-newbie-8/shell-script-to-s...