p The .Fl d option enables additional debugging output (which comes primarily from .Xr fsck 8 -derived code). .Sh COMMANDS Besides the built-in .Xr libedit 3 commands, .Nm supports these commands:
p l -tag -width indent -compact t Cm help Print out the list of accepted commands.
p t Cm inode Ar i-number Select inode .Ar i-number as the new current inode.
p t Cm back Revert to the previously current inode.
p t Cm clri Clear the current inode.
p t Cm lookup Ar name t Cm cd Ar name Find .Ar name in the current directory and make its inode the current inode. .Ar 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.
p t Cm active t Cm print Print out the active inode.
p t Cm uplink Increment the active inode's link count.
p t Cm downlink Decrement the active inode's link count.
p t Cm linkcount Ar number Set the active inode's link count to .Ar number .
p t Cm ls List the current inode's directory entries. This command is valid only if the current inode is a directory.
p t Cm rm Ar name t Cm del Ar name Remove the entry .Ar name from the current directory inode. This command is valid only if the current inode is a directory.
p t Cm ln Ar ino Ar name Create a link to inode .Ar ino under the name .Ar name in the current directory inode. This command is valid only if the current inode is a directory.
p t Cm chinum Ar dirslot Ar inum Change the i-number in directory entry .Ar dirslot to .Ar inum .
p t Cm chname Ar dirslot Ar name Change the name in directory entry .Ar dirslot to .Ar name . This command cannot expand a directory entry. You can only rename an entry if the name will fit into the existing directory slot.
p t Cm chtype Ar type Change the type of the current inode to .Ar type . .Ar type may be one of: .Em file , .Em dir , .Em socket , or .Em fifo .
p t Cm chmod Ar mode Change the mode bits of the current inode to .Ar mode . You cannot change the file type with this subcommand; use c chtype to do that.
p t Cm chflags Ar flags Change the file flags of the current inode to .Ar flags .
p t Cm chown Ar uid Change the owner of the current inode to .Ar uid .
p t Cm chgrp Ar gid Change the group of the current inode to .Ar gid .
p t Cm chgen Ar gen Change the generation number of the current inode to .Ar gen .
p t Cm mtime Ar time t Cm ctime Ar time t Cm atime Ar time Change the modification, change, or access time (respectively) on the current inode to .Ar time . .Ar Time should be in the format .Em YYYYMMDDHHMMSS[.nsec] where .Em nsec is an optional nanosecond specification. If no nanoseconds are specified, the .Va mtimensec , .Va ctimensec , or .Va atimensec field will be set to zero.
p t Cm quit, Cm q, Cm exit, Em <EOF> Exit the program. .El .Sh SEE ALSO .Xr libedit 3 , .Xr fs 5 , .Xr fsck 8 , .Xr clri 8 . .Sh 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 .Nm doesn't implement. The .Xr libedit 3 reference page is not yet written. .Sh HISTORY .Nm uses the source code for .Xr fsck 8 to implement most of the file system manipulation code. The remainder of .Nm first appeared in .Nx 1.1 . .Sh WARNING Use this tool with extreme caution--you can damage an FFS file system beyond what .Xr fsck 8 can repair.