Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!mtune!whuts!picuxa!tgr From: tgr@picuxa.UUCP (Dr. Emilio Lizardo) Newsgroups: comp.unix.wizards Subject: Re: help with missing lost+found! Message-ID: <287@picuxa.UUCP> Date: Mon, 24-Aug-87 18:01:39 EDT Article-I.D.: picuxa.287 Posted: Mon Aug 24 18:01:39 1987 Date-Received: Thu, 27-Aug-87 02:16:22 EDT References: <44059@beno.seismo.CSS.GOV> <252@macom1.UUCP> <66@aimt.UUCP> Organization: Trenton Home for the Criminally Insane Lines: 67 Summary: lost+found for SysV According to the System V Admin Guide (c) 1985, pg 3-34, 3-35: "As a general guide, the number of [i-node] slots to reserve is about ten percent of the number of i-nodes allocated for the file system." The following shell script accepts as argument $1 the number of inodes in the file system, then creates files in modulo 50 increments up to 10% of the argument. Your current directory should be the empty file system. Note: the "rm" statements at the end of this script may blow up if the file system is sufficiently large (error is "arg list too big" or some such nonsense). If this happens, change the lines to: rm [A-M][0-9]* rm [M-Z][0-9]* etc. or just try rm * ---------cut here------------ if [ "${#}" -gt "1" ] | [ "${#}" = "0" ] then echo "Usage: $0 n" echo " where n = number of i-nodes in file system." exit 1 fi # Loop for mod 50 of 10% of $1 n=`expr \( \( $1 / 10 \) +1 \) /50` if [ "$n" = "0" ] then n=1 fi # Create 50 files at a time while [ "${n}" -gt "0" ] do >a${n}; >b${n}; >c${n}; >d${n}; >e${n} >f${n}; >g${n}; >h${n}; >i${n}; >j${n} >k${n}; >l${n}; >m${n}; >n${n}; >o${n} >p${n}; >q${n}; >r${n}; >s${n}; >t${n} >u${n}; >v${n}; >w${n}; >x${n}; >y${n} >A${n}; >B${n}; >C${n}; >D${n}; >E${n} >F${n}; >G${n}; >H${n}; >I${n}; >J${n} >K${n}; >L${n}; >M${n}; >N${n}; >O${n} >P${n}; >Q${n}; >R${n}; >S${n}; >T${n} >U${n}; >V${n}; >W${n}; >X${n}; >Y${n} n=`expr ${n} - 1` done # Now remove files echo "Removing files..." rm [A-Z][0-9]* rm [a-z][0-9]* exit -- Tom Gillespie ( ...ihnp4!picuxa!tgr) | "Don't take life so serious... AT&T/EDS Product Integration Center | it ain't nohow permanent." 299 Jefferson Rd. | Parsippany, NJ 07054 (201) 952-1178 | Walt Kelly