Directories That Grow
Jeff Beadles
jeff at quark.WV.TEK.COM
Wed Apr 11 03:58:06 AEST 1990
pjh at mccc.uucp (Pete Holsberg) writes:
>In my news directory structure, certain very active directories appear
>to be growing without bound. For example, $NEWS/in.coming is very large
>but at this point contain about 4 actual files.
>
>How can I "reset" these directories so that "leading" entries with inode
>0 are removed?
>
>Thanks,
>Pete
Easy! Just do this.
(Make sure that you are not receiving/processing news when you do this.)
cd $NEWS
mv in.coming in.coming.old
mkdir in.coming
chmod xxx in.coming # Change to whatever permissions/owner the old
chown xxx in.coming # directory had.
chgrp xxx in.coming
mv in.coming.old/* in.coming
That will work as long as there are no files that start with "." in the
directory. If there are some (other than . and ..) you need to move them too.
In Unix, directories grow, but never shrink. This is the only way that I know
of to do this.
Best,
-Jeff
--
Jeff Beadles jeff at quark.WV.TEK.COM
Utek Engineering, Tektronix Inc. +1 503 685 2568
"Credo quia absurdum"
More information about the Comp.unix.questions
mailing list