Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Copy a file to all subfolders of a folder with one command' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Copy a file to all subfolders of a folder with one command
Authored by: fracai on Mar 02, '10 11:05:27AM
For files, I skip exec, which seems messy unless necessary, and use: find -name blah -print -delete
I also usually prefer to use xargs when possible, ie. find . -type d -print0 | xargs -0 -n1 cp php.ini
(-n1 tells xargs to execute the command once for each entry, rather than simply appending each to the end of the command)
Or: find -name .svn -print0 | xargs -0 rm -rf

All these "rm -rf" commands are going to give me nightmares.
---
i am jack's amusing sig file
Edited on Mar 02, '10 11:07:18AM by fracai


[ Reply to This | # ]