[huskerlug] Re: I ran into my first case of having too many files to rm on.

Sweet, thanks everyone! I'll keep your ideas in the back of my head in case
something like this comes up again.
It is also good to have a confirmation on the speed of the delete. I wasn't
sure if it was because my method was slow or if it was a characteristic of
the filesystem. When I said the ~11 GB "took forever" I should have said it
"took roughly 12 minutes"

Thanks,
Martin


On Fri, Jun 4, 2010 at 7:46 AM, MLS <mls@xxxxxxxxxx> wrote:

> Not sure about the speed, but when wildcarding fails... Find is your
> friend.
>
> To remove everything in the current dir...
> # find . -exec rm -f {} \;
>
> To remove all txt files...
> # find . -name '*.txt' -exec rm -f {} \;
>
> On 6/3/10, Martin Wolff <mwolffedu@xxxxxxxxx> wrote:
> > Hi,
> > I thought this might be an interesting discussion.
> >
> > Today, for the first time, I ran into a situation where GNU program
> > couldn't
> > handle me.  I had run "rm ./*"  on a directory and it failed because it
> had
> > too many arguments (more than 100,000 files existed.).
> > I then realized that I could just delete the directory just by doing rm
> -r
> > directorynamehere
> > It was only 11 GB in size, but it took forever to delete. I was just
> > curious
> > if there were any obvious things I should have done differently.  Perhaps
> > there is a better way to trash > 138,000 files?
> >
> >
> >
> > ----
> > Husker Linux Users Group mailing list
> > To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
> > with a subject of UNSUBSCRIBE
> >
> >
> >
>
> --
> Sent from my mobile device
>
> ----
> Husker Linux Users Group mailing list
> To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
> with a subject of UNSUBSCRIBE
>
>
>



----
Husker Linux Users Group mailing list
To unsubscribe, send a message to huskerlug-request@xxxxxxxxxxxxx
with a subject of UNSUBSCRIBE


Other related posts: