From owner-freebsd-questions Fri May 12 21: 8:29 2000 Delivered-To: freebsd-questions@freebsd.org Received: from flathead.gate.net (flathead.gate.net [216.219.246.5]) by hub.freebsd.org (Postfix) with ESMTP id B515037BBA7 for ; Fri, 12 May 2000 21:08:16 -0700 (PDT) (envelope-from wjm@gate.net) Received: from dakota.gate.net (dakota.gate.net [216.219.247.13]) by flathead.gate.net (AIX4.3/8.9.3/8.9.3) with ESMTP id AAA45580; Sat, 13 May 2000 00:08:10 -0400 Received: from localhost (wjm@localhost) by dakota.gate.net (8.8.6/8.7.3) with ESMTP id AAA03866; Sat, 13 May 2000 00:10:06 -0400 X-Authentication-Warning: dakota.gate.net: wjm owned process doing -bs Date: Sat, 13 May 2000 00:10:06 -0400 (EDT) From: William Melanson To: Steve Price Cc: Doug Barton , Darren Wyn Rees , freebsd-questions@FreeBSD.ORG Subject: Re: "rm -rf *" - "argument list too long" In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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