Home
Search all pages
Subjects
By activity
Professions, Sciences, Humanities, Business, ...
User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...
Text Strings
Conversions, tests, processing, manipulation,...
Math
Integer, Floating point, Matrix, Statistics, Boolean, ...
Processing
Algorithms, Memory, Process control, Debugging, ...
Stored Data
Data storage, Integrity, Encryption, Compression, ...
Communications
Networks, protocols, Interprocess, Remote, Client Server, ...
Hard World Timing, Calendar and Clock, Audio, Video, Printer, Controls...
File System
Management, Filtering, File & Directory access, Viewers, ...
|
|
|
RocketLink!--> Man page versions:
OpenBSD
FreeBSD
NetBSD
Others
FSDB(8) OpenBSD System Manager's Manual FSDB(8)
NAME
fsdb - FFS debugging/editing tool
SYNOPSIS
fsdb [-d] -f fsname
DESCRIPTION
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 filesystem (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 -d option enables additional debugging output (which comes primarily
from fsck(8)-derived code).
COMMANDS
Besides the built-in editline(3) commands, fsdb supports these commands:
help Print out the list of accepted commands.
inode i-number
Select inode i-number as the new current inode.
back Revert to the previously current inode.
clri Clear the current inode.
lookup name
cd name
Find name in the current directory and make its inode the current
inode. Name may be a multi-component name or may begin with
slash to indicate that the root inode should be used to start the
lookup. If some component along the pathname is not found, the
last valid directory encountered is left as the active inode.
This command is valid only if the starting inode is a directory.
active
print Print out the active inode.
uplink Increment the active inode's link count.
downlink
Decrement the active inode's link count.
linkcount number
Set the active inode's link count to number.
ls List the current inode's directory entries. This command is
valid only if the current inode is a directory.
rm name
del name
Remove the entry name from the current directory inode. This
command is valid only if the current inode is a directory.
ln ino name
Create a link to inode ino under the name name in the current di-
rectory inode. This command is valid only if the current inode
is a directory.
chinum dirslot inum
Change the i-number in directory entry dirslot to inum.
chname dirslot name
Change the name in directory entry dirslot to name. This command
cannot expand a directory entry. You can only rename an entry if
the name will fit into the existing directory slot.
chtype type
Change the type of the current inode to type. type may be one of:
file, dir, socket, or fifo.
chmod mode
Change the mode bits of the current inode to mode. You cannot
change the file type with this subcommand; use chtype to do that.
chflags flags
Change the file flags of the current inode to flags.
chown uid
Change the owner of the current inode to uid.
chlen length
Change the length of the current inode to length.
chgrp gid
Change the group of the current inode to gid.
chgen gen
Change the generation number of the current inode to gen.
mtime time
ctime time
atime time
Change the modification, change, or access time (respectively) on
the current inode to time. Time should be in the format
YYYYMMDDHHMMSS[.nsec] where nsec is an optional nanosecond speci-
fication. If no nanoseconds are specified, the mtimensec,
ctimensec, or atimensec field will be set to zero.
quit, q, exit, <EOF>
Exit the program.
SEE ALSO
editline(3), fs(5), fsck(8), clri(8).
BUGS
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.
HISTORY
fsdb uses the source code for fsck(8) to implement most of the file sys-
tem manipulation code. The remainder of fsdb first appeared in NetBSD
1.1.
WARNING
Use this tool with extreme caution--you can damage an FFS file system be-
yond what fsck(8) can repair.
OpenBSD 2.3 September 14, 1995 2
Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts Institute of Technology, Free Software Foundation, FreeBSD Inc., and others. |
(Corrections, notes, and links courtesy of RocketAware.com)
FreeBSD Sources for fsdb(8) OpenBSD sources for fsdb(8)
Up to: File System Operations - Operations for entire file-systems (quotas, configuration, consistency, mount, unmount, et al)
RocketLink!--> Man page versions:
OpenBSD
FreeBSD
NetBSD
Others
Rapid-Links:
Search | About | Comments | Submit Path: RocketAware > man pages >
fsdb.8/
RocketAware.com is a service of Mib Software Copyright 1999, Forrest J. Cavalier III. All Rights Reserved. We welcome submissions and comments
|