[NTLUG:Discuss] Removing lots of Files - help.
kbrannen@gte.net
kbrannen at gte.net
Sun Apr 6 23:47:33 CDT 2003
Pervaz Allaudin wrote:
> Pardom my ignorance - but would not
>
> rm -rfv *.*~
>
> also work just as well or would it necessarily be too dangerous.
In addition to Fred's "." comment, this would remove directories, the other
command wouldn't (as it didn't have "-r"). Also, this doesn't recurse into
dirs to find the files, while "find" does. rm's recursion and find's
recursion are different:
* rm's is remove recursively while searching only in the current dir (with
that pattern),
* find's is search recurively for things that match (no matter how deep in dirs).
If this is still unclear, I'd suggest making a temp dir and putting some dirs
(at least 3 levels deep) and files into them (at each of the levels), and then
try each command to get a better feel for what each does. (Hint: be sure you
run the find command (without the "xargs rm") first, unless you have a script
to auto-create your temp dirs/files. :-)
HTH,
Kevin
More information about the Discuss
mailing list