Another fdisk partition for 386/ix.

Conor P. Cahill cpcahil at virtech.uucp
Mon Nov 20 13:58:51 AEST 1989


In article <4339 at dell.dell.com>, jrh at 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     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.i386 mailing list