Path: utzoo!utgpu!watmath!att!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386 Subject: Re: Another fdisk partition for 386/ix. Message-ID: <1989Nov20.025851.24857@virtech.uucp> Date: 20 Nov 89 02:58:51 GMT References: <24172@cup.portal.com> <1763@syma.sussex.ac.uk> <4339@dell.dell.com> Organization: Virtual Technologies Inc. Lines: 51 In article <4339@dell.dell.com>, jrh@mustang.dell.com (jrh) writes: > to fix the problem, just do the following: > > # mkdir /lost+found > # cd /lost+found > # cp /usr/bin/* /lost+found > # rm * > # cd / > # ls -al I wouldn't recommend doing this (especially because of the use of the "rm *" by root). Copying all files from /usr/bin to any lost+found will take a long time and can run the file system out of space. A faster mechanism would be to put the following into a shell file: mkdir lost+found cd lost+found for i in 1 2 3 4 5 6 7 8 9 0 do for j in 1 2 3 4 5 6 7 8 9 0 do for k in 1 2 3 4 5 do > $i$j$k done done done rm [0-9]* NOTE-> I just typed that in off the top of my head, so there may be a typo. This will always creat 500 slots in the directory and not use up any real file system space while creating the slots. The use of "for i in 1 2..." is just to preclude the use of something like i=1; while [ i -lt 500 ] do > $i i=`expr $i + 1` done which is much, much slower. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+