Sunday, December 14, 2008

How to copy Specific file from a Dir recursively?

How to copy Specific file from a Dir recursively?

You can also use rsync to grab those files, for example, to get all the text files (ending in ".txt"):

Code:

#rsync -r -f "+ */" -f "+ *.txt" -f "- *" tmp/ temp/

Where "tmp" is the source directory, and "temp" is the destination (it will copy from the source dir, not the source dir itself)

No comments:

Post a Comment