Whamcloud - gitweb
AOSP: Android: run bpfmt on all bp files
[tools/e2fsprogs.git] / debugfs / debugfs.8.in
index e85034a..637d22b 100644 (file)
@@ -59,8 +59,8 @@ e2fsprogs.
 .I \-c
 Specifies that the file system should be opened in catastrophic mode, in
 which the inode and group bitmaps are not read initially.  This can be
-useful for filesystems with significant corruption, but because of this,
-catastrophic mode forces the filesystem to be opened read-only.
+useful for file systems with significant corruption, but because of this,
+catastrophic mode forces the file system to be opened read-only.
 .TP
 .I \-i
 Specifies that
@@ -102,9 +102,9 @@ extremely badly damaged/corrupted.)
 .I -s superblock
 Causes the file system superblock to be read from the given block
 number, instead of using the primary superblock (located at an offset of
-1024 bytes from the beginning of the filesystem).  If you specify the
+1024 bytes from the beginning of the file system).  If you specify the
 .I -s
-option, you must also provide the blocksize of the filesystem via the
+option, you must also provide the blocksize of the file system via the
 .I -b
 option.   (This
 option is rarely needed; it is used primarily when the file system is
@@ -143,7 +143,7 @@ Before overwriting a file system block, write the old contents of the block to
 an undo file.  This undo file can be used with e2undo(8) to restore the old
 contents of the file system should something go wrong.  If the empty string is
 passed as the undo_file argument, the undo file will be written to a file named
-resize2fs-\fIdevice\fR.e2undo in the directory specified via the
+debugfs-\fIdevice\fR.e2undo in the directory specified via the
 \fIE2FSPROGS_UNDO_DIR\fR environment variable.
 
 WARNING: The undo file cannot be used to recover from a power or system crash.
@@ -153,7 +153,7 @@ Many
 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
+in the file system which is currently opened by
 .BR debugfs .
 The
 .I filespec
@@ -161,7 +161,7 @@ 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
+('/'), then it is interpreted relative to the root of the file system
 which is currently opened by
 .BR debugfs .
 If not, the pathname is
@@ -179,7 +179,7 @@ This is a list of the commands which
 .B debugfs
 supports.
 .TP
-.BI blocks " filespace"
+.BI blocks " filespec"
 Print the blocks used by the inode
 .I filespec
 to stdout.
@@ -190,16 +190,21 @@ Print or set the physical block number corresponding to the logical block number
 in the inode
 .IR filespec .
 If the
-.I -a
+.I \-a
 flag is specified, try to allocate a block if necessary.
 .TP
-.BI block_dump " [-f filespec] block_num"
-Dump the filesystem block given by
+.BI block_dump " '[ -x ] [-f filespec] block_num"
+Dump the file system block given by
 .I block_num
 in hex and ASCII format to the console.  If the
-.I -f
+.I \-f
 option is specified, the block number is relative to the start of the given
 .BR filespec .
+If the
+.I \-x
+option is specified, the block is interpreted as an extended attribute
+block and printed to show the structure of extended attribute data
+structures.
 .TP
 .BI cat " filespec"
 Dump the contents of the inode
@@ -225,14 +230,23 @@ master superblock.
 Clear the contents of the inode
 .IR filespec .
 .TP
+.BI copy_inode " source_inode destination_inode"
+Copy the contents of the inode structure in
+.I source_inode
+and use it to overwrite the inode structure at
+.IR destination_inode .
+.TP
 .BI dirsearch " filespec filename"
 Search the directory
 .I filespec
 for
 .IR filename .
 .TP
-.B dirty
-Mark the filesystem as dirty, so that the superblocks will be written on exit.
+.BI dirty " [-clean]"
+Mark the file system as dirty, so that the superblocks will be written on exit.
+Additionally, clear the superblock's valid flag, or set it if
+.I -clean
+is specified.
 .TP
 .BI dump " [-p] filespec out_file"
 Dump the contents of the inode
@@ -266,7 +280,7 @@ The hash seed specified with
 must be in UUID format.
 .TP
 .BI dump_extents " [-n] [-l] filespec"
-Dump the the extent tree of the inode
+Dump the extent tree of the inode
 .IR filespec .
 The
 .I -n
@@ -280,11 +294,14 @@ to only display the leaf nodes in the extent tree.
 .IP
 (Please note that the length and range of blocks for the last extent in
 an interior node is an estimate by the extents library functions, and is
-not stored in filesystem data structures.   Hence, the values displayed
+not stored in file system data structures.   Hence, the values displayed
 may not necessarily by accurate and does not indicate a problem or
 corruption in the file system.)
 .TP
-.BI ea_get " [-f outfile] filespec attr_name"
+.B dump_unused
+Dump unused blocks which contain non-null bytes.
+.TP
+.BI ea_get " [-f outfile]|[-xVC] [-r] filespec attr_name"
 Retrieve the value of the extended attribute
 .I attr_name
 in the file
@@ -296,7 +313,7 @@ List the extended attributes associated with the file
 .I filespec
 to standard output.
 .TP
-.BI ea_set " [-f infile] filespec attr_name attr_value
+.BI ea_set " [-f infile] [-r] filespec attr_name attr_value
 Set the value of the extended attribute
 .I attr_name
 in the file
@@ -322,9 +339,9 @@ of free disk blocks or the maximum file size is reached.  Existing
 mappings are left alone.
 .TP
 .BI feature " [fs_feature] [-fs_feature] ..."
-Set or clear various filesystem features in the superblock.  After setting
-or clearing any filesystem features that were requested, print the current
-state of the filesystem feature set.
+Set or clear various file system features in the superblock.  After setting
+or clearing any file system features that were requested, print the current
+state of the file system feature set.
 .TP
 .BI filefrag " [-dvr] filespec"
 Print the number of contiguous extents in
@@ -396,6 +413,9 @@ If
 .I num
 is specified, also clear num-1 inodes after the specified inode.
 .TP
+.BI get_quota " quota_type id"
+Display quota information for given quota type (user, group, or project) and ID.
+.TP
 .B help
 Print a list of commands understood by
 .BR debugfs .
@@ -409,8 +429,20 @@ showing its tree structure.
 Print a listing of the inodes which use the one or more blocks specified
 on the command line.
 .TP
-.BI inode_dump " filespec"
+.BI inode_dump " [-b]|[-e]|[-x] filespec"
 Print the contents of the inode data structure in hex and ASCII format.
+The
+.I \-b
+option causes the command to only dump the contents of the
+.B i_blocks
+array.  The
+.I \-e
+option causes the command to only dump the contents of the extra inode
+space, which is used to store in-line extended attributes. The
+.I \-x
+option causes the command to dump the extra inode space interpreted and
+extended attributes.  This is useful to debug corrupted inodes
+containing extended attributes.
 .TP
 .BI imap " filespec"
 Print the location of the inode data structure (in the inode table)
@@ -431,7 +463,7 @@ the superblock and block descriptors.
 .BI journal_close
 Close the open journal.
 .TP
-.BI journal_open " [-c] [-v ver] [-j ext_jnl]
+.BI journal_open " [-c] [-v ver] [-f ext_jnl]
 Opens the journal for reading and writing.  Journal checksumming can
 be enabled by supplying \fI-c\fR; checksum formats 2 and 3 can be
 selected with the \fI-v\fR option.  An external journal can be loaded
@@ -461,7 +493,10 @@ Change the current working directory of the
 .B debugfs
 process to
 .I directory
-on the native filesystem.
+on the native file system.
+.TP
+.BI list_quota " quota_type"
+Display quota information for given quota type (user, group, or project).
 .TP
 .BI ln " filespec dest_file"
 Create a link named
@@ -470,7 +505,7 @@ which is a hard link to
 .IR filespec .
 Note this does not adjust the inode reference counts.
 .TP
-.BI logdump " [-acsO] [-b block] [-i filespec] [-f journal_file] [output_file]"
+.BI logdump " [-acsOS] [-b block] [-i filespec] [-f journal_file] [output_file]"
 Dump the contents of the ext3 journal.  By default, dump the journal inode as
 specified in the superblock.  However, this can be overridden with the
 .I \-i
@@ -484,6 +519,12 @@ option utilizes the backup information in the superblock to locate the
 journal.
 .IP
 The
+.I \-S
+option causes
+.B logdump
+to print the contents of the journal superblock.
+.IP
+The
 .I \-a
 option causes the
 .B logdump
@@ -492,7 +533,7 @@ The
 .I \-b
 option causes
 .B logdump
-to print all journal records that are refer to the specified block.
+to print all journal records that refer to the specified block.
 The
 .I \-c
 option will print out the contents of all of the data blocks selected by
@@ -564,15 +605,15 @@ to those inodes.  The
 flag will enable checking the file type information in the directory
 entry to make sure it matches the inode's type.
 .TP
-.BI open " [-weficD] [-b blocksize] [-s superblock] [-z undo_file] device"
-Open a filesystem for editing.  The
+.BI open " [-weficD] [-b blocksize] [-d image_filename] [-s superblock] [-z undo_file] device"
+Open a file system for editing.  The
 .I -f
-flag forces the filesystem to be opened even if there are some unknown
-or incompatible filesystem features which would normally
-prevent the filesystem from being opened.  The
+flag forces the file system to be opened even if there are some unknown
+or incompatible file system features which would normally
+prevent the file system from being opened.  The
 .I -e
-flag causes the filesystem to be opened in exclusive mode.  The
-.IR -b ", " -c ", " -i ", " -s ", " -w ", and " -D
+flag causes the file system to be opened in exclusive mode.  The
+.IR -b ", " -c ", " -d ", " -i ", " -s ", " -w ", and " -D
 options behave the same as the command-line options to
 .BR debugfs .
 .TP
@@ -606,7 +647,7 @@ or multiple
 and all its contents (including regular files, symbolic links, and other
 directories) into the named
 .IR destination ,
-which should be an existing directory on the native filesystem.
+which should be an existing directory on the native file system.
 .TP
 .BI rm " pathname"
 Unlink
@@ -643,6 +684,10 @@ has value
 Also available as
 .BR set_bg .
 .TP
+.BI set_current_time " time"
+Set current time in seconds since Unix epoch to use when setting file system
+fields.
+.TP
 .BI seti " filespec [num]"
 Mark inode
 .I filespec
@@ -685,6 +730,11 @@ can be displayed by using the command:
 Also available as
 .BR ssv .
 .TP
+.B show_debugfs_params
+Display
+.B debugfs
+parameters such as information about currently opened file system.
+.TP
 .BI show_super_stats " [-h]"
 List the contents of the super block and the block group descriptors.  If the
 .I -h
@@ -695,6 +745,10 @@ flag is given, only print out the superblock contents. Also available as
 Display the contents of the inode structure of the inode
 .IR filespec .
 .TP
+.B supported_features
+Display file system features supported by this version of
+.BR debugfs .
+.TP
 .BI testb " block [count]"
 Test if the block number
 .I block
@@ -730,7 +784,7 @@ pass, use the debugfs
 .B link
 command to link the inode to the destination pathname, or use
 .B e2fsck
-to check the filesystem and link all of the recovered inodes to the
+to check the file system and link all of the recovered inodes to the
 lost+found directory.
 .TP
 .BI unlink " pathname"
@@ -741,7 +795,7 @@ to an inode.  Note this does not adjust the inode reference counts.
 .BI write " source_file out_file"
 Copy the contents of
 .I source_file
-into a newly-created file in the filesystem named
+into a newly-created file in the file system named
 .IR out_file .
 .TP
 .BI zap_block " [-f filespec] [-o offset] [-l length] [-p pattern] block_num"