IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New want to delete multi thousands of little files
rm -r directory has been running for 30 minutes. Must be a way to destroy the directory inode which should effectivly free up subsequent inode pointers to be used elsewhere. Any ideas?
thanx,
bill
All tribal myths are true, for a given value of "true" Terry Pratchett
[link|http://boxleys.blogspot.com/|http://boxleys.blogspot.com/]

Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 48 years. meep
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
New Saw something like this on FC3
Unfortunately, newer file systems optimize for lookup at the cost of delete. We worked around the problem by dividing intermediate files up into separate directories, trying to limit a directory to about 3K files.
New Use a better filesystem
I'd expect rm -r to be close to the most efficient way to clear a directory. If you just forcibly unlink the root directory node you won't clear all of the files in it, you'd just wind up with unreachable inodes in use. You need to actually visit each inode and clear it.

If you want to clear the directory quickly you can try running rm -d as superuser. (It is a GNU option, they won't even let you try as anyone else, and it is not guaranteed to work on all operating systems and filesystems - some don't want you to do something that stupid.)

But filesystems vary widely in how quickly they handle this particular task. If you think that you'll need to do this often then investigate and choose one that makes it fast.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New Can't help you now...
...but if you need to do this again, I hear XFS is the filesystem you want.

If it's a Linux box, ReiserFS is allegedly better with large numbers of files in a directory.


Peter
[link|http://www.ubuntulinux.org|Ubuntu Linux]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New thanx all, we are a solaris shop,
it was a horked install of some software, I needed to replace this older directory with a link to where the directory really is. For now a mv directory foo was quick so I can get on with the job at hand.
thanx,bill
All tribal myths are true, for a given value of "true" Terry Pratchett
[link|http://boxleys.blogspot.com/|http://boxleys.blogspot.com/]

Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 48 years. meep
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
     want to delete multi thousands of little files - (boxley) - (4)
         Saw something like this on FC3 - (dws)
         Use a better filesystem - (ben_tilly)
         Can't help you now... - (pwhysall) - (1)
             thanx all, we are a solaris shop, - (boxley)

The annual lizardfall in the Monterey preserve of California approaches 4,800 lizards per acre per year.
59 ms