Something like:
cp sourcedir/* destdir/ --exclude sourcedir/*.snm
2. Can rm search for and remove a file or pattern selectively, at more
than one directory level. I.e. if backup files are scattered at
several levels, and I want to remove them all:
rm *~ --recursive
The -R option only seems to work when removing everything.
Thanks.
-Matthew
No, cp does not offer that option. But you can achieve the
same end with other tools; for example:
find sourcedir/* -type d -prune -o ! -name \*.snm -print0 |
cpio -pd --null destdir
>2. Can rm search for and remove a file or pattern selectively, at more
>than one directory level. I.e. if backup files are scattered at
>several levels, and I want to remove them all:
>rm *~ --recursive
>The -R option only seems to work when removing everything.
Again, not directly. But consider:
find . -name \*~ -print0 | xargs -0 rm
--Ken Pizzini