Date: Sat, 13 May 2000 00:10:06 -0400 (EDT) From: William Melanson <wjm@gate.net> To: Steve Price <sprice@hiwaay.net> Cc: Doug Barton <DougB@gorean.org>, Darren Wyn Rees <merlin@netlink.co.uk>, freebsd-questions@FreeBSD.ORG Subject: Re: "rm -rf *" - "argument list too long" Message-ID: <Pine.A41.4.21.0005130004100.46376-100000@dakota.gate.net> In-Reply-To: <Pine.OSF.4.21.0005071911060.3613-100000@fly.HiWAAY.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 7 May 2000, Steve Price wrote: % On Sun, 7 May 2000, Doug Barton wrote: % % # First, ignore the overly complicated and potentially dangerous answers % # so far on this thread. :) Second, think about it for a minute. If "*" % # provides a list that's too long for rm to handle, why not break it up % # into smaller chunks? For example, if your files mainly have alpha % # characters in their names, do something like: % # % # rm [a-c]* % # % # Starting with larger chunks, and going smaller as needed till the error % # messages disappear. % % Something like this doesn't work? % % ls * | xargs rm % % Seems simple enough and should do it all in one pass. :) % % -steve % % % % To Unsubscribe: send mail to majordomo@FreeBSD.org % with "unsubscribe freebsd-questions" in the body of the message % I know this sounds a bit crazy but how about this: rm -i ./* (please be in the directory of choice) Then and "yes" and "no" them as you cruise along? It may take a bit of time but at least you don't kiss the good guys bye, bye... An once of prevention... :) --------------------------------oOo------------------------------------ William J. Melanson CyberGate, Inc. | e.spire Communications Sr Network Controller www.gate.net ---- www.espire.net Network Operations Center Phone: (954) 334-8080 finger wjm@gate.net PGP public key --------------------------------oOo------------------------------------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.21.0005130004100.46376-100000>