DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Complex File Copy

05.30.2005
| 6282 views |
  • submit to reddit
        
find *.orig.jpg | perl -p -e 's/\n//; $x = $_; s/\.orig/\.large/; $_ = "cp " . $x . " " . $_ . "\n"'

Would have used the basename | xargs method covered here, but the filenames were odd.