X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=debugfs%2Fdebugfs.8.in;h=65a30d53c27dd3d78e497add08713824bc62f244;hb=1b977a0fad7be60d444228b5802683ff6b78baf2;hp=a6ca838e10adabc26be4f8891c95f64ed4e915ad;hpb=71ff129e9f5c942ce4d2eb20e269100d15c1a6ae;p=tools%2Fe2fsprogs.git diff --git a/debugfs/debugfs.8.in b/debugfs/debugfs.8.in index a6ca838..65a30d5 100644 --- a/debugfs/debugfs.8.in +++ b/debugfs/debugfs.8.in @@ -4,11 +4,11 @@ .\" .TH DEBUGFS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" .SH NAME -debugfs \- ext2/ext3 file system debugger +debugfs \- ext2/ext3/ext4 file system debugger .SH SYNOPSIS .B debugfs [ -.B \-Vwci +.B \-DVwcin ] [ .B \-b @@ -37,10 +37,10 @@ device The .B debugfs program is an interactive file system debugger. It can be used to -examine and change the state of an ext2 file system. +examine and change the state of an ext2, ext3, or ext4 file system. .br .I device -is the special file corresponding to the device containing the ext2 +is the special file corresponding to the device containing the file system (e.g /dev/hdXX). .SH OPTIONS .TP @@ -48,6 +48,11 @@ file system (e.g /dev/hdXX). 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 \-n +Disables metadata checksum verification. This should only be used if +you believe the metadata to be correct despite the complaints of +e2fsprogs. +.TP .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 @@ -106,7 +111,14 @@ to read in commands from and execute them. When .B debugfs is finished executing those commands, it will exit. -.TP +.TP +.I -D +Causes +.B debugfs +to open the device using Direct I/O, bypassing the buffer cache. Note +that some Linux devices, notably device mapper as of this writing, do +not support Direct I/O. +.TP .I -R request Causes .B debugfs @@ -150,12 +162,21 @@ This is a list of the commands which .B debugfs supports. .TP +.I blocks filespace +Print the blocks used by the inode +.I filespec +to stdout. +.TP .I bmap filespec logical_block Print the physical block number corresponding to the logical block number .I logical_block in the inode .IR filespec . .TP +.I block_dump [-f out_file] block_num +Dump the contents of a block, optionally to +.IR out_file . +.TP .I cat filespec Dump the contents of the inode .I filespec @@ -169,14 +190,24 @@ Change the current working directory to Change the root directory to be the directory .IR filespec . .TP -.I close -Close the currently open file system. +.I close [-a] +Close the currently open file system. If the +.I -a +option is specified, write out any changes to the superblock and block +group descriptors to all of the backup superblocks, not just to the +master superblock. .TP .I clri file Clear the contents of the inode .IR file . .TP -.I dump [-p] filspec out_file +.I dirsearch filespec filename +Search the directory +.I filespec +for +.IR filename . +.TP +.I dump [-p] filespec out_file Dump the contents of the inode .I filespec to the output file @@ -188,6 +219,38 @@ option is given set the owner, group and permissions information on to match .IR filespec . .TP +.I dump_mmp +Display the multiple-mount protection (mmp) field values. +.TP +.I dx_hash [-h hash_alg] [-s hash_seed] filename +Calculate the directory hash of +.IR filename . +The hash algorithm specified with +.I -h +may be "legacy" "half_md4" or "tea". +The hash seed specified with +.I -s +must be in UUID format. +.TP +.I dump_extents [-n] [-l] filespec +Dump the the extent tree of the inode +.IR filespec . +The +.I -n +flag will cause +.I dump_extents +to only display the interior nodes in the extent tree. The +.I -l +flag cause +.I dump_extents +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 +may not necessarily by accurate and does not indicate a problem or +corruption in the file system.) +.TP .I expand_dir filespec Expand the directory .IR filespec . @@ -197,6 +260,27 @@ 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. .TP +.I filefrag [-dvr] filespec +Print the number of contiguous extents in +.IR filespec . +If +.I filespec +is a directory and the +.I -d +option is not specified, +.I filefrag +will print the number of contiguous extents for each file in +the directory. The +.I -v +option will cause +.I filefrag +print a tabular listing of the contiguous extents in the +file. The +.I -r +option will cause +.I filefrag +to do a recursive listing of the directory. +.TP .I find_free_block [count [goal]] Find the first .I count @@ -226,13 +310,31 @@ blocks starting at block number .I block will be marked as not allocated. .TP -.I freei filespec +.I freefrag [-c chunk_kb ] +Report free space fragmentation on the currently open file system. +If the +.I \-c +option is specified then the filefrag command will print how many free +chunks of size +.I chunk_kb +can be found in the file system. The chunk size must be a power of two +and be larger than the file system block size. +.TP +.I freei filespec [num] Free the inode specified by .IR filespec . +If +.I num +is specified, also clear num-1 inodes after the specified inode. .TP .I help Print a list of commands understood by -.BR debugfs (8). +.BR debugfs . +.TP +.I htree_dump filespec +Dump the hash-indexed directory +.IR filespec , +showing its tree structure. .TP .I icheck block ... Print a listing of the inodes which use the one or more blocks specified @@ -307,20 +409,23 @@ and .I \-b options. .TP -.I ls [-l] [-d] [-p] filespec +.I ls [-l] [-c] [-d] [-p] filespec Print a listing of the files in the directory .IR filespec . The .I \-l flag will list files using a more verbose format. The +.I \-c +flag causes directory block checksums (if present) to be displayed. +The .I \-d flag will list deleted entries in the directory. The .I \-p flag will list the files in a format which is more easily parsable by scripts, as well as making it more clear when there are spaces or other -non-prinitng characters at the end of filenames. +non-printing characters at the end of filenames. .TP .I modify_inode filespec Modify the contents of the inode structure in the inode @@ -337,11 +442,14 @@ and .I minor device numbers must be specified. .TP -.I ncheck inode_num ... +.I ncheck [-c] inode_num ... Take the requested list of inode numbers, and print a listing of pathnames -to those inodes. +to those inodes. The +.I -c +flag will enable checking the file type information in the directory +entry to make sure it matches the inode's type. .TP -.I open [-w] [-e] [-f] [-i] [-c] [-b blocksize] [-s superblock] device +.I open [-w] [-e] [-f] [-i] [-c] [-D] [-b blocksize] [-s superblock] device Open a filesystem for editing. The .I -f flag forces the filesystem to be opened even if there are some unknown @@ -349,10 +457,25 @@ or incompatible filesystem features which would normally prevent the filesystem from being opened. The .I -e flag causes the filesystem to be opened in exclusive mode. The -.IR -b ", " -c ", " -i ", " -s ", and " -w +.IR -b ", " -c ", " -i ", " -s ", " -w ", and " -D options behave the same as the command-line options to .BR debugfs . .TP +.I punch filespec start_blk [end_blk] +Delete the blocks in the inode ranging from +.I start_blk +to +.IR end_blk . +If +.I end_blk +is omitted then this command will function as a truncate command; that +is, all of the blocks starting at +.I start_blk +through to the end of the file will be deallocated. +.TP +.I symlink filespec target +Make a symbolic link. +.TP .I pwd Print the current working directory. .TP @@ -401,10 +524,12 @@ so that the block group descriptor field has value .I value. .TP -.I seti filespec +.I seti filespec [num] Mark inode .I filespec -as in use in the inode bitmap. +as in use in the inode bitmap. If +.I num +is specified, also set num-1 inodes after the specified inode. .TP .I set_inode_field filespec field value Modify the inode specified by @@ -417,6 +542,16 @@ The list of valid inode fields which can be set via this command can be displayed by using the command: .B set_inode_field -l .TP +.I set_mmp_value field value +Modify the multiple-mount protection (mmp) data so that the +mmp field +.I field +has value +.I value. +The list of valid mmp fields which can be set via this command +can be displayed by using the command: +.B set_mmp_value -l +.TP .I set_super_value field value Set the superblock field .I field @@ -471,7 +606,7 @@ pass, use the debugfs 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 -lost+found dirctory. +lost+found directory. .TP .I unlink pathname Remove the link specified by @@ -484,11 +619,19 @@ Create a file in the filesystem named and copy the contents of .I source_file into the destination file. +.TP +.I zap_block [-f file] [-o offset] [-l length] [-p pattern] block_num +Zero, or pattern-fill, portions of a block within a file or +within the filesystem. +.TP +.I zap_block [-f file] [-b bit] block_num +Bit-flip portions of a block within a file or +within the filesystem. .SH ENVIRONMENT VARIABLES .TP .B DEBUGFS_PAGER, PAGER The -.BR debugfs (8) +.B debugfs program always pipes the output of the some commands through a pager program. These commands include: .IR show_super_stats ,