s5 filesystem debugger
fsdb [-F s5]
[generic_options] [-z i-number]
are options supported by the generic fsdb command.
can be used
to patch up
a damaged s5 filesystem
after a crash.
special is a special device used to indicate
the filesystem to be debugged.
It has conversions
to translate block and i-numbers
into their corresponding disk addresses.
Also included are mnemonic offsets
to access different parts
of an i-node.
These greatly simplify the process
of correcting control block entries
or descending the filesystem tree.
contains several error-checking routines
to verify i-node and block addresses.
These can be disabled if necessary
by invoking fsdb with the optional
- argument or by the use of the
reads the i-size and f-size entries
from the superblock of the filesystem
as the basis for these checks.)
The options are:
Numbers are considered decimal by default.
Octal numbers must be prefixed
with a zero.
During any assignment operation,
numbers are checked
for a possible truncation error
due to a size mismatch
between source and destination.
Specify the s5 FSType. If -F s5
is not specified heuristics similiar to those used
are used to determine the file
This command executes faster if it is not required
to autodetect file system types. If possible, specify
Clear the i-node identified by i-number.
reads a block at a time
and will therefore work with raw as well as block
A buffer management routine
is used to retain commonly used
blocks of data
in order to reduce the number of read system calls.
All assignment operations result
in an immediate write-through
of the corresponding block.
The symbols recognized by fsdb are:
The print facilities generate a formatted output
in various styles.
The current address is normalized
to an appropriate boundary before printing begins.
It advances with the printing
and is left at the address of the last item printed.
The output can be terminated at any time
by typing the delete character.
If a number follows the ``p'' symbol,
that many entries are printed.
A check is made to detect block boundary overflows
since logically sequential blocks are generally not physically
If a count of zero is used, all entries to the end of the
current block are printed.
The print options available are:
convert from i-number to i-node address
convert to block address
directory slot offset
save, restore an address
character string assignment
error checking flip flop
general print facilities
file print facility
double word mode
escape to shell
The ``f'' symbol is used to print data blocks
associated with the current i-node.
If followed by a number,
that block of the file is printed.
(Blocks are numbered from zero.)
The desired print option letter
follows the block number,
if present, or the ``f'' symbol.
This print facility works
for small as well as large files.
It checks for special devices
the block pointers
used to find the data
are not zero.
print as i-nodes
print as directories
print as octal words
print as decimal words
print as characters
print as octal bytes
Dots, tabs, and spaces may be used
as function delimiters but are not necessary.
A line with just a new-line character
will increment the current address
by the size of the data type last printed.
the address is set to the next byte,
word, double word, directory entry or i-node,
allowing the user
to step through a region of a filesystem.
Information is printed
in a format appropriate to the data type.
Bytes, words and double words
are displayed with the octal address
followed by the value in octal and decimal.
A ``.B'' or ``.D''
is appended to the address
for byte and double word values, respectively.
Directories are printed as a
directory slot offset
followed by the decimal
i-number and the character representation
of the entry name.
I-nodes are printed
with labeled fields
describing each element.
The following mnemonics
are used for i-node examination
and refer to the current working i-node:
user ID number
group ID number
data block numbers (0 - 12)
major device number
minor device number
prints i-number 386 in an i-node format.
This now becomes the current working i-node.
changes the link count for the
working i-node to 4.
increments the link count by 1.
prints, in ASCII,
block zero of the file associated
with the working i-node.
prints the first 32 directory
entries for the root i-node of this filesystem.
changes the current i-node to that
associated with the 5th directory entry
(numbered from zero)
found from the above command.
The first logical block of the file
is then printed in ASCII.
prints the superblock of this filesystem
changes the i-number for the
seventh directory slot in the root directory to 3.
This example also shows how several
operations can be combined on one command line.
changes the name field
in the directory slot to the given string.
Quotes are optional
when used with nm
if the first character is alphabetic.
prints the third block of the current i-node as directory entries.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004