Re: deleting specific files
"Jason P. Holland" <jphollan@earthlink.net> writes:
> find /dir -name "*.doc" -exec rm -rf {} \;
Nits:
* -r is probably not desired for this problem. If you run across
a directory named "something.doc", it's clearly not a file and you
may not want to delete it.
* -f is possibly not desired for this problem. If you run across a
file that rm won't kill by default, you clearly thought it was
worthy of protection at some point, and may want to look at it
before nuking it.
--
Alan Shutko <ats@acm.org> - In a variety of flavors!
The less time planning, the more time programming.
Reply to: