.SH SYNOPSIS
.B debugfs
[
-.B \-w
-]
-[
.B \-f
cmd_file
]
request
]
[
+.B \-V
+]
+[
+.B \-w
+[
device
]
+]
.SH DESCRIPTION
The
.B debugfs
.SH OPTIONS
.TP
.I -w
-Specify that the file system should be open in read-write mode. Without this
-option, the file system is open in read-only mode.
+Specifies that the file system should be opened in read-write mode.
+Without this option, the file system is opened in read-only mode.
.TP
.I -f cmd_file
Causes
.IR cmd_file ,
and execute them. When
.B debugfs
-is finsihed executing those commands, it will exit.
+is finished executing those commands, it will exit.
.TP
.I -R request
Causes
to execute the single command
.IR request ,
and then exit.
+.TP
+.I -V
+print the version number of
+.B debugfs
+and exit.
.SH COMMANDS
.B debugfs
is an interactive debugger. It understands a number of commands.
.I find_free_block [goal]
Find the first free block, starting from
.I goal
-and allocates it.
+and allocate it.
.TP
.I find_free_inode [dir [mode]]
-Find a free inode and allocates it. If present,
+Find a free inode and allocate it. If present,
.I dir
specifies the inode number of the directory
which the inode is to be located. The second
.TP
.I freei filespec
Free the inode specified by
-.I filespec
+.IR filespec .
.TP
.I help
Print a list of commands understood by
.BR debugfs (8).
.TP
.I icheck block ...
-Print a listing of the inodes which use the one or more block specified
+Print a listing of the inodes which use the one or more blocks specified
on the command line.
.TP
.I initialize device blocksize
the superblock and block descriptors.
.TP
.I kill_file filespec
-Dellocate the inode
+Deallocate the inode
.I filespec
and its blocks. Note that this does not remove any directory
entries (if any) to this inode. See the
-.I rm
+.BR rm (1)
command if you wish to unlink a file.
.TP
.I ln filespec dest_file
.IR filespec .
Note this does not adjust the inode reference counts.
.TP
-.I ls filespec
+.I ls [-l] filespec
Print a listing of the files in the directory
.IR filespec .
.TP
device numbers must be specified.
.TP
.I ncheck inode_num ...
-Take the requested list of inode numbers, and print a listing of pathnams
+Take the requested list of inode numbers, and print a listing of pathnames
to those inodes.
.TP
.I open [-w] device
.I rm pathname
Unlink
.IR pathname .
-If this cuases the inode pointed to by
+If this causes the inode pointed to by
.I pathname
to have no other references, deallocate the file. This command functions
as the unlink() system call.
commands take a
.I filespec
as an argument to specify an inode (as opposed to a pathname)
-in the filesystem which is currently opened by debugfs. The
+in the filesystem which is currently opened by
+.BR debugfs .
+The
.I filespec
argument may be specified in two forms. The first form is an inode
number surrounded by angle brackets, e.g.,
.IR <2> .
The second form is a pathname; if the pathname is prefixed by a forward slash
('/'), then it is interpreted relative to the root of the filesystem
-which is currently opened by debugfs. If not, the pathname is
-interpreted relative to the current working directory as maintained
-by debugfs. This may be modified by using the debugfs command
+which is currently opened by
+.BR debugfs .
+If not, the pathname is
+interpreted relative to the current working directory as maintained by
+.BR debugfs .
+This may be modified by using the
+.B debugfs
+command
.IR cd .
.SH AUTHOR
.B debugfs