Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* Efficient way of deleted large directories
@ 2004-09-23  1:16 Jeremy Thomson
  2004-09-23  2:37 ` Bob Harris
  2004-09-23 13:23 ` Peter da Silva
  0 siblings, 2 replies; 6+ messages in thread
From: Jeremy Thomson @ 2004-09-23  1:16 UTC (permalink / raw)


Well I got myself into quite a mess.
We have a vdump tape backup, that saved cloned filesets.
The vdump was taking soo long it was still going when purge routines
kicked into life by cron.
So we were backing up directories whilst trying to delete old files
from them.
Things slowed down.

It seems the more activity there is on a cloned fileset the longer it
takes to remove the clone, am I right?

So I had directories with upwards of 500,000 files in them.
Doing ...
ls -1 >filelist
xargs -i  rm -f {} <filelist

takes a long time.

Would it be more efficient to reverse the order of files in filelist?
I'm thinking a rm would delete a directory entry them perhaps all the
entries below get shuffled up to close the gap in the directory file?

What I'm doing now is a mv of the directory to a new name.
Recreate the directory.
then rm -r newdirname

This doesnt seem to be working any faster.

I really need these directories cleared so that the vdump wont take so
long.

thanx in advance,
Jeremy Thomson


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-26 22:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23  1:16 Efficient way of deleted large directories Jeremy Thomson
2004-09-23  2:37 ` Bob Harris
2004-09-23 22:59   ` Jeremy Thomson
2004-09-24  2:13     ` Bob Harris
2004-09-26 22:50       ` Jeremy Thomson
2004-09-23 13:23 ` Peter da Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox