On Linux, how do I recursively copy files while ignoring certain names? On Linux, how do I recursively copy files while ignoring certain names? unix unix

On Linux, how do I recursively copy files while ignoring certain names?


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.


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.