Re: Deleting LARGE number of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all for your suggestions!  I like Andrew's bash
iterator method which he sent off-list the best.  The
directory removing option was not a viable alternative, as
the directory in question actually happens to be
/var/spool/mqueue and I remember once upon a time (years
ago) when I just deleted it and recreated it manually, the
mail server was complaining ever since about incorrect
something or other.  I don't recall what it was, it's been
too long ago, but it was not permissions or ownership of the
re-created directory.  In any case, I'd rather leave the
directory alone and just wipe the thousands of undeliverable
messages in it, which now I can.  :-)

Thanks again,

Chris



> -----Original Message-----
> Sent: Tuesday, April 27, 2004 1:44 PM
> To: General Red Hat Linux discussion list
> Subject: Re: Deleting LARGE number of files
>
>  You can remove the directory recursively,
>  or be more precise with a combination of
>  find and xargs.
>
>  The basic tool is xargs. See the man page.
>
> --- Chris <redhat-list@xxxxxxxxxxxxxxxxxxx> wrote:
> > Okay, newbie question - and I can't find the answer
> > on Google...  :-|
> >
> > How can you delete the contents of a directory that
> > has a HUGE number of files?  By huge I mean when
> > "rm -f *" complains with "too many items" error
> > message.  I don't care what's in there, I just want
> > to wipe it all.


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux