how to copy dir by excluding some subdir?

yonas Abraham yabraham2 at gmail.com
Thu Oct 19 22:27:14 UTC 2006


i want to copy one directory with big sub directory and files on it
with the exception of some of its sub directories.

I usually just do cp -r A B, and go to B and delete the once that I
don't need it. But this becomes expensive as the size of the subdir
gets bigger and bigger.

I was hopping something like cp -r --exclude=C A B, to copy dir A to B
with the exception of dir C which is a sub dir of A. But man cp,
didn't give me such thing.

any help?

Thanks




More information about the fedora-list mailing list