On Mon, 25 Sep 2000 18:11:17 -0700,
Matthew Weaver <msw_1
...@yahoo.com> wrote:
>1. Can I get cp to exclude certain files, either by name or by
>globbing pattern?
>Something like:
>cp sourcedir/* destdir/ --exclude sourcedir/*.snm
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