Showing posts with label recursive file copy. Show all posts
Showing posts with label recursive file copy. Show all posts

Thursday, August 23, 2012

copy select files recursively in linux


In Linux to recursively copy select files within a directory structure to a destination folder (without maintaining the source directory structure) use the below command,

find . -name '*tests.txt' -exec cp {} /myprojects/myfiles \;

note: the '\;' is needed by the exec command