Path: utzoo!attcan!uunet!zephyr.ens.tek.com!orca.wv.tek.com!quark!jeff From: jeff@quark.WV.TEK.COM (Jeff Beadles) Newsgroups: comp.unix.questions Subject: Re: Directories That Grow Message-ID: <6740@orca.wv.tek.com> Date: 10 Apr 90 17:58:06 GMT References: <1990Apr10.002953.1233@mccc.uucp> Sender: news@orca.wv.tek.com Reply-To: jeff@quark.WV.TEK.COM (Jeff Beadles) Organization: Tektronix, Inc., Wilsonville, OR Lines: 37 pjh@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@quark.WV.TEK.COM Utek Engineering, Tektronix Inc. +1 503 685 2568 "Credo quia absurdum"