Recursive copy with exclusions
I require a solution for this problem:
Let there be a directory original/ with the following structure:
original/
++-dir1/
++++-file1
++++-file2
++++-file3
++-dir2/
++++-pic1
++++-pic2
Let there also be a file named directives with the following content:
How would I recursively copy the contents of original/ to new/ and exclude the files and directories listed in directives. The original directory tree must be reproduced in new/.
I've tried a few things with find and xargs to little avail (they would copy all the files to new (except those in the excluded directories), but the directory tree would not be preserved).
I'm starting to think about writing my own recursive copy function, but there must surely be an easier way...
Thanks,
silentrebel
Last edited by silentrebel; November 9th, 2009 at 08:30 PM.
L'idée de communauté consiste d'offrande constante sans s'attendre à quoi que ce soit d'elle.
The idea of community consists of constant giving without expectation of return.
Bookmarks