Making lost+found directory (was Re: Another partition for 386/ix.)

John G. De Armond jgd at rsiatl.UUCP
Sun Nov 19 06:31:10 AEST 1989


In article <24172 at cup.portal.com> swatt at cup.portal.com (Steven Edward Watt) writes:
>  In the SCO implementation, the lost+found directory is created in the mkdev
>script for file systems.  It uses a nested for loop to generate some large
>number of files, and then deletes them.  I probably shouldn't post the source..
>.
>they might get mad.  :-)

Ok,

I'll post my own then :-)   Script to create a lost+found directory follows.
I call it "mklost+found"

----------------------- cut here --------------------------------------------


# makes a lost and found directory
echo "\n\n This script makes a lost and found directory on a new
file system.  You should be in the root directory of the new file
system when you execute this command.

Hit <return> to start ...\c"

read Barf

mkdir lost+found
chmod +rwx lost+found
cd lost+found

for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
do
	for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
	do
		echo "" >f.$i.$j
	done
done
rm -f f*

echo "Done ... "

-------------------------------------- cut here --------------------------------
-- 
John De Armond, WD4OQC                     | Manual? ... What manual ?!? 
Radiation Systems, Inc.     Atlanta, GA    | This is Unix, My son, You 
emory!rsiatl!jgd          **I am the NRA** | just GOTTA Know!!! 



More information about the Comp.unix.i386 mailing list