Return to BSD News archive
Xref: sserve comp.unix.wizards:30155 comp.unix.bsd:12319 comp.unix.questions:36914
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!soda.berkeley.edu!scott
From: scott@soda.berkeley.edu (Scott Silvey)
Newsgroups: comp.unix.wizards,comp.unix.bsd,comp.unix.questions
Subject: Revised od/BSD filesystem question
Date: 23 Jul 1993 19:13:41 GMT
Organization: U.C. Berkeley, CS Undergraduate Association
Lines: 48
Distribution: world
Message-ID: <22pd95$ke0@agate.berkeley.edu>
NNTP-Posting-Host: soda.berkeley.edu
Hi all!
Yesterday I posted a question regarding some output from od on a BSD 4.3
system with the command "od -cdw12 ~". The questions I posted yesterday
were poorly phrased because I didn't really know the nature of the problem
I was trying to address. Let me try again (thanks to everyone who replied
to my initial posting and helped clarify exactly what it was I was trying
to ask).
Here it goes -
0000000 \0 \0 016 \0 \0 \f \0 001 . \0 \0 \0
00000 03584 00012 00001 11776 00000
|______|_______|
Looking at the lower 2 bytes of the inode data (016 \0) we get the following:
[ 0*8^5 + 1*8^4 + 6*8^3 ] + [ 0 + 0 + 0 ] = 7168 decimal
(3584*2)
A major part of my confusion regarding the output of od (although I did
not know this at the time I sent the info request) is the fact that the
high byte is doubled, this in turn allows 5 decimal bytes to represent
6 octal bytes (seen using the 'd' flag). Why do it this way? and what
happens when an inode entry is 3 or 4 bytes long?
0000014 \0 \0 007 \0 \0 \f \0 002 . . \0 \0
00000 01792 00012 00002 11822 00000
0000030 \0 \0 016 001 \0 024 \0 013 . X r e
00000 03585 00020 00011 11864 29285
0000044 s o u r c e s \0 \0 \0 016 002
29551 30066 25445 29440 00000 03586
0000060 \0 020 \0 006 . a l i a s \0 \0
00016 00006 11873 27753 24947 00000
0000074 \0 \0 016 003 \0 020 \0 006 . c s h
00000 03587 00016 00006 11875 29544
0000110 r c \0 \0 \0 \0 016 004 \0 020 \0 004
29283 00000 00000 03588 00016 00004
0000124 . e n v \0 \0 \0 \0 \0 \0 016 005
11877 28278 00000 00000 00000 03589
Thanx in advance,
Jon.
P.S. Please send replies to jon@lurnix.com