Directories That Grow

Steve Manning stv at ferret.UUCP
Sat Apr 14 23:00:45 AEST 1990


In article <795 at uncle.UUCP> donlash at uncle.UUCP (Donald Lashomb) writes:
>In article <1990Apr10.002953.1233 at mccc.uucp> 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?
>
>try -
>	  mv $NEWS/in.coming $NEWS/in.coming-old
>	  mkdir $NEWS/in.coming
>	  find $NEWS/in.coming-old -print | cpio -pdlm $NEWS/in.coming

This isn't quite right.  The "find" command line should be replaced by:

	  cd $NEWS/in.coming-old
	  find . -print | cpio -pdlm $NEWS/in.coming

Otherwise the entire $NEWS/in.coming-old heirarchy will be recreated under
$NEWS/in.coming, so that you end up with paths of:

	$NEWS/in.coming$NEWS/in.coming-old/somefile
	
rather than grafting what is _under_ $NEWS/in.coming-old across to
$NEWS/in.coming.

At least, that's how it works on the versions that I use.  Is there another
way to accomplish this?
-----



More information about the Comp.unix.questions mailing list