I was wondering how to file all directories that match a string and then if found, copy a file from root to that directory.

link|improve this question

feedback

1 Answer

up vote 3 down vote accepted
find some/dir -type d -name foo.42 -exec cp somefile {} \;
link|improve this answer
thanks so much! saved me a lot of time. i really appreciate it. – Scott Apr 22 '11 at 8:57
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.