Date: Thu, 21 Aug 1997 15:37:36 +0300 From: Sakari Jalovaara <sja@tekla.fi> To: freebsd-hackers@FreeBSD.ORG Subject: Re: More info on slow "rm" times with 2.2.1+. Message-ID: <9708211237.AA04003@poveri.tekla.fi>
next in thread | raw e-mail | index | archive | help
>> Isn't there a command (which could be run in >> daily, or weekly, or something) that goes through a directory (or many) and >> optimize the space they take? >> >> If there isn't... why? And would it be hard to write? OLD=old-directory NEW=some-unique-name-$$ mkdir "$NEW" mv "$OLD"/* "$NEW" # You'd need a little something called "statf" here # `statf "chmod %m $NEW; chown %u $NEW; chgrp %g $NEW" "$OLD"` rmdir "$OLD" mv "$NEW" "$OLD" You'd have to make sure there are no other processes going through the directory at the time, though. I vaguely recall some UNIX variant having Amazing Automagically Shrinking Directories but I can't remember which one. ++sja
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9708211237.AA04003>