Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 May 2000 19:12:30 -0500 (CDT)
From:      Steve Price <sprice@hiwaay.net>
To:        Doug Barton <DougB@gorean.org>
Cc:        Darren Wyn Rees <merlin@netlink.co.uk>, freebsd-questions@FreeBSD.ORG
Subject:   Re: "rm -rf *" - "argument list too long"
Message-ID:  <Pine.OSF.4.21.0005071911060.3613-100000@fly.HiWAAY.net>
In-Reply-To: <39160161.4BCFEFE3@gorean.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.4.21.0005071911060.3613-100000>