[CentOS] Silly question - Anything faster than rm?

Bill Campbell centos at celestial.com
Sun Sep 30 00:32:49 UTC 2007

On Sat, Sep 29, 2007, Jamie Lists wrote:
>On 9/29/07, Luciano Rocha <strange at nsk.no-ip.org> wrote:
>> On Sat, Sep 29, 2007 at 04:43:43AM -0700, Jamie Lists wrote:
>> > Maybe this is a silly question, but i have a few million files i need
>> > to delete but i can't just reformat the volume.
>> >
>> > Right now the fastest thing i can think of is
>> >
>> > nice -20 rm -Rf /folder-i-want-to-delete
>> >
>> > is there a better or faster way to do this?
>> No, but if you want to re-use the directory name, rename it before
>> removing it:
>> mv folder-i-want-to-delete _removed_folder
>> rm -fr _removed_folder &
>> keep working...
>> --
>Thanks for the tip.. We just have millions and millions of files and
>it's taking FOREVER haha!
>I thought maybe there might be some other command i'm not aware of
>that would wipe this stuff out faster ya know.

If there's not much other data on the file system it might be
faster to copy that off, make a new file system, then copy the
data back.

INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Government's view of the economy could be summed up in a few short phrases:
If it moves, tax it.  If it keeps moving, regulate it.  And if it stops
moving, subsidize it -- Ronald Reagan

More information about the CentOS mailing list