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

Re: Delete 4 million files



On Mar 19, 2009, at 1:38 AM, Paul E Condon wrote:
> Create a path, on the same disk to a place called 'hide', and
> mv /bar/foo /hide
> rm -rf /hide/foo &

This is excellent practical advice. (I tend to mv /bar/foo
/bar/too.DELETEME and then delete that, but the principle's the same as
long as you ensure the mv doesn't cross filesystem boundaries.)


Hal Vaughan <hal@halblog.com> wrote:
> Won't this run into a problem with the infamous "argument list too  
> long" response from rm that we've been talking about once it descends  
> into the subdirectories?

The argument list refers purely to the list of arguments expanded by the
shell and passed to the command. The list of files within the subdirectory
is processed by rm itself; the shell gets nowhere near it.

Chris


Reply to: