| FSDB(8) | System Manager's Manual | FSDB(8) |
fsdb — FFS
debugging/editing tool
fsdb |
[-d] -f
fsname |
fsdb opens fsname
(usually a raw disk partition) and runs a command loop allowing manipulation
of the file system's inode data. You are prompted to enter a command with
fsdb (inum X)> where X is
the currently selected i-number. The initial selected inode is the root of
the file system (i-number 2).
The command processor uses the editline(3) library, so you can use command line editing to reduce typing if desired. When you exit the command loop, the file system superblock is marked dirty and any buffered blocks are written to the file system.
The options are as follows:
-d-f
fsnameBesides the built-in
editline(3) commands,
fsdb supports these commands:
helpinode
i-numberbackclri
i-numberlookup
name, cd
nameThis command is valid only if the starting inode is a directory.
active,
printuplinkdownlinklinkcount
numberlsrm
name, del
nameln
ino namechinum
dirslot inumchname
dirslot namechtype
typechmod
modechtype to do that.
chflags
flagschown
uidchlen
lengthchgrp
gidchgen
genmtime
time, ctime
time, atime
timequit,
q, exit,
<EOF>fsdb uses the source code for
fsck(8) to implement most of the
file system manipulation code. The remainder of fsdb
first appeared in NetBSD 1.1.
Manipulation of “short” symlinks doesn't work (in particular, don't try changing a symlink's type).
You must specify modes as numbers rather than symbolic names.
There are a bunch of other things that you might want to do which
fsdb doesn't implement.
Use this tool with extreme caution – you can damage an FFS file system beyond what fsck(8) can repair.
| April 23, 2020 | openbsd |