I need to recursively copy a directory tree, ignoring any subdirectories named 'CVS'. Is there a simple way to do this?
+9
A:
tar -cpf - --exclude=CVS directory | sh -c 'cd /wherever/it/goes && tar -xpf -'
Modify the right-hand tar
's options to -xvpf
if you'd like to see what's going on.
chaos
2009-08-17 12:57:21
Jukka Matilainen
2009-08-17 22:24:08
A fine thought. :)
chaos
2009-08-17 22:44:24
+7
A:
Why not approach it from a slightly different angle and check out the files from CVS using the export command.
This'll give you the directories without any of the CVS artifacts.
Rob Wells
2009-08-17 13:01:12