Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Delete entire directory, getting argument list too long?

  • Subject: Re: Delete entire directory, getting argument list too long?
  • From: Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>
  • Date: Sun, 26 Feb 2006 06:21:29 +0000
  • Followup-to: alt.comp.os.linux,alt.linux,alt.linux.redhat,alt.os.linux
  • Newsgroups: alt.comp.os.linux, alt.linux, alt.linux.redhat, alt.os.linux
  • Organization: schestowitz.com / MCC / Manchester University
  • References: <CKednVg2DaRKb53ZnZ2dnUVZ_tydnZ2d@adelphia.com> <pan.2006.02.26.02.26.19.448289@zianet.com> <klh7d3-un6.ln1@xword.teksavvy.com>
  • Reply-to: newsgroups@xxxxxxxxxxxxxxx
  • User-agent: KNode/0.7.2
__/ [ Chris F.A. Johnson ] on Sunday 26 February 2006 02:51 \__

> On 2006-02-26, ray wrote:
>> On Sat, 25 Feb 2006 16:23:43 -0800, Shabam wrote:
>>
>>> I'm trying to do a "rm -rf *" to a particular directory of files and
>>> subfolders (the mail spool folder due to spam).  However it keeps telling
>>> me
>>> that the argument list is too long.  Rather than deleting files slowly in
>>> chunks, how do I remove everything with just one command?
>>
>> another way would be:
>>
>> find . -exec rm {} \;
> 
>    That will be slow. Use '+' instead of '\;' (on POSIX-compliant
>    find, including recent GNU versions), or:
> 
> find . -print0 | xargs -0 rm
> 
>    Or, as I posted before:
> 
> rm -rf ./

The brutal way:

mv <PATH>/<mail_spool_dir> /dev/null
mkdir <PATH>/<mail_spool_dir>

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index