Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: panzerboy@gmail.com (Jeremy Thomson)
Subject: Efficient way of deleted large directories
Date: 22 Sep 2004 18:16:17 -0700	[thread overview]
Message-ID: <6425a413.0409221716.55a1cb5@posting.google.com> (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


             reply	other threads:[~2004-09-23  1:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-23  1:16 Jeremy Thomson [this message]
2004-09-23  2:37 ` Efficient way of deleted large directories 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
read-only archive

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