Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mimsy!umd5!brl-adm!adm!franco@mikey.bbn.com From: franco@mikey.bbn.com (Frank A. Lonigro) Newsgroups: comp.unix.wizards Subject: [MIKEY Mail System: Failed mail (msg.aa07282)] Message-ID: <8680@brl-adm.ARPA> Date: Thu, 6-Aug-87 16:38:58 EDT Article-I.D.: brl-adm.8680 Posted: Thu Aug 6 16:38:58 1987 Date-Received: Sat, 8-Aug-87 13:00:15 EDT Sender: news@brl-adm.ARPA Lines: 33 Gary Sloane writes: > Do any of you wizards out there in netland have a quick and easy way > (BESIDES running mkfs) to recreate an accidentally deleted lost+found > directory? Using mkdir() doesn't cut it... Gary: On most UNIX systems that I know about there is a mklost+found command located in the /etc directory, but if your system doesn't have it, here is the shell script called mklost+found: --- cut --- cut --- cut --- cut --- cut --- cut --- mkdir lost+found cd lost+found echo creating slots... for i in 1 2 3 4 5 6 7 8 9 0 a b c d e f do tee ${i}1 ${i}2 ${i}3 ${i}4 ${i}5 ${i}6 ${i}7 ${i}8 < /dev/null tee ${i}9 ${i}a ${i}b ${i}c ${i}d ${i}e ${i}f ${i}0 < /dev/null done echo removing dummy files... for i in 1 2 3 4 5 6 7 8 9 0 a b c d e f do rm ${i}1 ${i}2 ${i}3 ${i}4 ${i}5 ${i}6 ${i}7 ${i}8 rm ${i}9 ${i}a ${i}b ${i}c ${i}d ${i}e ${i}f ${i}0 done cd .. echo done ls -ld `pwd`/lost+found --- cut --- cut --- cut --- cut --- cut --- cut --- That should do it. -franco%mikey.bbn.com@relay.cs.net