From blocks to files (on a UNIXpc)

was-John McMillan jcm at mtunb.ATT.COM
Tue Feb 14 02:32:31 AEST 1989


Mea culpa:  too many balls in the air, too few brains in the head.
I indeed posted erroneous advice.  Read on....

In article <446 at amanue.UUCP> jr at amanue.UUCP (Jim Rosenberg) writes:
>In article <462 at manta.pha.pa.us> brant at manta.pha.pa.us (Brant Cheikes) writes:
>>Given a block number, how can I find out (a) if it's part of a file,
>>and (b) what file it's part of?
>>...
>This is something that people wanna do so often it amazes me there's not a
>utility for this.  An fsdb wizard might be able to tell you how -- a script
>redirecting fsdb's input???

There USED to be a program that did this:

	icheck  -b  #B#  ...  #B#  FileSystem
		-- produced a list of INODES which "Owned" those blocks.

(Unfortunately, I forgot to post the above in my previous, brain-damaged note.)
The next step is to use ICHECK's output:

	ncheck  -i  #I#  ...  #I#  FileSystem
		-- then turned those INODE numbers into FileNames.

When FSCK came along, AT&T seems to have dropped ICHECK.  I can't legitimately
hand out any hack I have for icheck... but others are apparently busily
at work on it.

Written properly, an "icheck" clone could be run as:
	ncheck -i `eyecheck -b #B# ... FS 2> Aye2` FS

Berkeley still provides ICHECK, I believe -- probably DCHECK as well.
Ahhhh, those beautiful red-eyed nights spent with *check, piecing
together blithered FS before FSCK was born.

jc mcmillan	-- att!mtunb!jcm	-- speaking for self, only
				(Those WEREN'T the "good ol' days", were they?)



More information about the Unix-pc.general mailing list