]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - debugfs/debugfs.8.in
Merge branch 'maint' into next
[thirdparty/e2fsprogs.git] / debugfs / debugfs.8.in
1 .\" -*- nroff -*-
2 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
4 .\"
5 .TH DEBUGFS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 debugfs \- ext2/ext3/ext4 file system debugger
8 .SH SYNOPSIS
9 .B debugfs
10 [
11 .B \-DVwcin
12 ]
13 [
14 .B \-b
15 blocksize
16 ]
17 [
18 .B \-s
19 superblock
20 ]
21 [
22 .B \-f
23 cmd_file
24 ]
25 [
26 .B \-R
27 request
28 ]
29 [
30 .B \-d
31 data_source_device
32 ]
33 [
34 .B \-z
35 .I undo_file
36 ]
37 [
38 device
39 ]
40 .SH DESCRIPTION
41 The
42 .B debugfs
43 program is an interactive file system debugger. It can be used to
44 examine and change the state of an ext2, ext3, or ext4 file system.
45 .PP
46 .I device
47 is a block device (e.g., /dev/sdXX) or a file containing the file system.
48 .SH OPTIONS
49 .TP
50 .I \-w
51 Specifies that the file system should be opened in read-write mode.
52 Without this option, the file system is opened in read-only mode.
53 .TP
54 .I \-n
55 Disables metadata checksum verification. This should only be used if
56 you believe the metadata to be correct despite the complaints of
57 e2fsprogs.
58 .TP
59 .I \-c
60 Specifies that the file system should be opened in catastrophic mode, in
61 which the inode and group bitmaps are not read initially. This can be
62 useful for file systems with significant corruption, but because of this,
63 catastrophic mode forces the file system to be opened read-only.
64 .TP
65 .I \-i
66 Specifies that
67 .I device
68 represents an ext2 image file created by the
69 .B e2image
70 program. Since the ext2 image file only contains the superblock, block
71 group descriptor, block and inode allocation bitmaps, and
72 the inode table, many
73 .B debugfs
74 commands will not function properly.
75 .B Warning:
76 no safety checks are in place, and
77 .B debugfs
78 may fail in interesting ways if commands such as
79 .IR ls ", " dump ", "
80 etc. are tried without specifying the
81 .I data_source_device
82 using the
83 .I \-d
84 option.
85 .B debugfs
86 is a debugging tool. It has rough edges!
87 .TP
88 .I -d data_source_device
89 Used with the
90 .I \-i
91 option, specifies that
92 .I data_source_device
93 should be used when reading blocks not found in the ext2 image file.
94 This includes data, directory, and indirect blocks.
95 .TP
96 .I -b blocksize
97 Forces the use of the given block size (in bytes) for the file system,
98 rather than detecting the correct block size automatically. (This
99 option is rarely needed; it is used primarily when the file system is
100 extremely badly damaged/corrupted.)
101 .TP
102 .I -s superblock
103 Causes the file system superblock to be read from the given block
104 number, instead of using the primary superblock (located at an offset of
105 1024 bytes from the beginning of the file system). If you specify the
106 .I -s
107 option, you must also provide the blocksize of the file system via the
108 .I -b
109 option. (This
110 option is rarely needed; it is used primarily when the file system is
111 extremely badly damaged/corrupted.)
112 .TP
113 .I -f cmd_file
114 Causes
115 .B debugfs
116 to read in commands from
117 .IR cmd_file ,
118 and execute them. When
119 .B debugfs
120 is finished executing those commands, it will exit.
121 .TP
122 .I -D
123 Causes
124 .B debugfs
125 to open the device using Direct I/O, bypassing the buffer cache. Note
126 that some Linux devices, notably device mapper as of this writing, do
127 not support Direct I/O.
128 .TP
129 .I -R request
130 Causes
131 .B debugfs
132 to execute the single command
133 .IR request ,
134 and then exit.
135 .TP
136 .I -V
137 print the version number of
138 .B debugfs
139 and exit.
140 .TP
141 .BI \-z " undo_file"
142 Before overwriting a file system block, write the old contents of the block to
143 an undo file. This undo file can be used with e2undo(8) to restore the old
144 contents of the file system should something go wrong. If the empty string is
145 passed as the undo_file argument, the undo file will be written to a file named
146 debugfs-\fIdevice\fR.e2undo in the directory specified via the
147 \fIE2FSPROGS_UNDO_DIR\fR environment variable.
148
149 WARNING: The undo file cannot be used to recover from a power or system crash.
150 .SH SPECIFYING FILES
151 Many
152 .B debugfs
153 commands take a
154 .I filespec
155 as an argument to specify an inode (as opposed to a pathname)
156 in the file system which is currently opened by
157 .BR debugfs .
158 The
159 .I filespec
160 argument may be specified in two forms. The first form is an inode
161 number surrounded by angle brackets, e.g.,
162 .IR <2> .
163 The second form is a pathname; if the pathname is prefixed by a forward slash
164 ('/'), then it is interpreted relative to the root of the file system
165 which is currently opened by
166 .BR debugfs .
167 If not, the pathname is
168 interpreted relative to the current working directory as maintained by
169 .BR debugfs .
170 This may be modified by using the
171 .B debugfs
172 command
173 .IR cd .
174 .\"
175 .\"
176 .\"
177 .SH COMMANDS
178 This is a list of the commands which
179 .B debugfs
180 supports.
181 .TP
182 .BI blocks " filespec"
183 Print the blocks used by the inode
184 .I filespec
185 to stdout.
186 .TP
187 .BI bmap " [ -a ] filespec logical_block [physical_block]"
188 Print or set the physical block number corresponding to the logical block number
189 .I logical_block
190 in the inode
191 .IR filespec .
192 If the
193 .I \-a
194 flag is specified, try to allocate a block if necessary.
195 .TP
196 .BI block_dump " '[ -x ] [-f filespec] block_num"
197 Dump the file system block given by
198 .I block_num
199 in hex and ASCII format to the console. If the
200 .I \-f
201 option is specified, the block number is relative to the start of the given
202 .BR filespec .
203 If the
204 .I \-x
205 option is specified, the block is interpreted as an extended attribute
206 block and printed to show the structure of extended attribute data
207 structures.
208 .TP
209 .BI cat " filespec"
210 Dump the contents of the inode
211 .I filespec
212 to stdout.
213 .TP
214 .BI cd " filespec"
215 Change the current working directory to
216 .IR filespec .
217 .TP
218 .BI chroot " filespec"
219 Change the root directory to be the directory
220 .IR filespec .
221 .TP
222 .BI close " [-a]"
223 Close the currently open file system. If the
224 .I -a
225 option is specified, write out any changes to the superblock and block
226 group descriptors to all of the backup superblocks, not just to the
227 master superblock.
228 .TP
229 .BI clri " filespec"
230 Clear the contents of the inode
231 .IR filespec .
232 .TP
233 .BI copy_inode " source_inode destination_inode"
234 Copy the contents of the inode structure in
235 .I source_inode
236 and use it to overwrite the inode structure at
237 .IR destination_inode .
238 .TP
239 .BI dirsearch " filespec filename"
240 Search the directory
241 .I filespec
242 for
243 .IR filename .
244 .TP
245 .BI dirty " [-clean]"
246 Mark the file system as dirty, so that the superblocks will be written on exit.
247 Additionally, clear the superblock's valid flag, or set it if
248 .I -clean
249 is specified.
250 .TP
251 .BI dump " [-p] filespec out_file"
252 Dump the contents of the inode
253 .I filespec
254 to the output file
255 .IR out_file .
256 If the
257 .I -p
258 option is given set the owner, group and permissions information on
259 .I out_file
260 to match
261 .IR filespec .
262 .TP
263 .BI dump_mmp " [mmp_block]"
264 Display the multiple-mount protection (mmp) field values. If
265 .I mmp_block
266 is specified then verify and dump the MMP values from the given block
267 number, otherwise use the
268 .B s_mmp_block
269 field in the superblock to locate and use the existing MMP block.
270 .TP
271 .BI dx_hash " [-h hash_alg] [-s hash_seed] filename"
272 Calculate the directory hash of
273 .IR filename .
274 The hash algorithm specified with
275 .I -h
276 may be
277 .BR legacy , " half_md4" ", or " tea .
278 The hash seed specified with
279 .I -s
280 must be in UUID format.
281 .TP
282 .BI dump_extents " [-n] [-l] filespec"
283 Dump the extent tree of the inode
284 .IR filespec .
285 The
286 .I -n
287 flag will cause
288 .B dump_extents
289 to only display the interior nodes in the extent tree. The
290 .I -l
291 flag will cause
292 .B dump_extents
293 to only display the leaf nodes in the extent tree.
294 .IP
295 (Please note that the length and range of blocks for the last extent in
296 an interior node is an estimate by the extents library functions, and is
297 not stored in file system data structures. Hence, the values displayed
298 may not necessarily by accurate and does not indicate a problem or
299 corruption in the file system.)
300 .TP
301 .B dump_unused
302 Dump unused blocks which contain non-null bytes.
303 .TP
304 .BI ea_get " [-f outfile]|[-xVC] [-r] filespec attr_name"
305 Retrieve the value of the extended attribute
306 .I attr_name
307 in the file
308 .I filespec
309 and write it either to stdout or to \fIoutfile\fR.
310 .TP
311 .BI ea_list " filespec
312 List the extended attributes associated with the file
313 .I filespec
314 to standard output.
315 .TP
316 .BI ea_set " [-f infile] [-r] filespec attr_name attr_value
317 Set the value of the extended attribute
318 .I attr_name
319 in the file
320 .I filespec
321 to the string value
322 .I attr_value
323 or read it from \fIinfile\fR.
324 .TP
325 .BI ea_rm " filespec attr_names...
326 Remove the extended attribute
327 .I attr_name
328 from the file \fIfilespec\fR.
329 .TP
330 .BI expand_dir " filespec"
331 Expand the directory
332 .IR filespec .
333 .TP
334 .BI fallocate " filespec start_block [end_block]
335 Allocate and map uninitialized blocks into \fIfilespec\fR between
336 logical block \fIstart_block\fR and \fIend_block\fR, inclusive. If
337 \fIend_block\fR is not supplied, this function maps until it runs out
338 of free disk blocks or the maximum file size is reached. Existing
339 mappings are left alone.
340 .TP
341 .BI feature " [fs_feature] [-fs_feature] ..."
342 Set or clear various file system features in the superblock. After setting
343 or clearing any file system features that were requested, print the current
344 state of the file system feature set.
345 .TP
346 .BI filefrag " [-dvr] filespec"
347 Print the number of contiguous extents in
348 .IR filespec .
349 If
350 .I filespec
351 is a directory and the
352 .I -d
353 option is not specified,
354 .I filefrag
355 will print the number of contiguous extents for each file in
356 the directory. The
357 .I -v
358 option will cause
359 .I filefrag
360 print a tabular listing of the contiguous extents in the
361 file. The
362 .I -r
363 option will cause
364 .I filefrag
365 to do a recursive listing of the directory.
366 .TP
367 .BI find_free_block " [count [goal]]"
368 Find the first
369 .I count
370 free blocks, starting from
371 .I goal
372 and allocate it. Also available as
373 .BR ffb .
374 .TP
375 .BI find_free_inode " [dir [mode]]"
376 Find a free inode and allocate it. If present,
377 .I dir
378 specifies the inode number of the directory
379 which the inode is to be located. The second
380 optional argument
381 .I mode
382 specifies the permissions of the new inode. (If the directory bit is set
383 on the mode, the allocation routine will function differently.) Also
384 available as
385 .BR ffi .
386 .TP
387 .BI freeb " block [count]"
388 Mark the block number
389 .I block
390 as not allocated.
391 If the optional argument
392 .I count
393 is present, then
394 .I count
395 blocks starting at block number
396 .I block
397 will be marked as not allocated.
398 .TP
399 .BI freefrag " [-c chunk_kb]"
400 Report free space fragmentation on the currently open file system.
401 If the
402 .I \-c
403 option is specified then the filefrag command will print how many free
404 chunks of size
405 .I chunk_kb
406 can be found in the file system. The chunk size must be a power of two
407 and be larger than the file system block size.
408 .TP
409 .BI freei " filespec [num]"
410 Free the inode specified by
411 .IR filespec .
412 If
413 .I num
414 is specified, also clear num-1 inodes after the specified inode.
415 .TP
416 .BI get_quota " quota_type id"
417 Display quota information for given quota type (user, group, or project) and ID.
418 .TP
419 .B help
420 Print a list of commands understood by
421 .BR debugfs .
422 .TP
423 .BI htree_dump " filespec"
424 Dump the hash-indexed directory
425 .IR filespec ,
426 showing its tree structure.
427 .TP
428 .BI icheck " block ..."
429 Print a listing of the inodes which use the one or more blocks specified
430 on the command line.
431 .TP
432 .BI inode_dump " [-b]|[-e]|[-x] filespec"
433 Print the contents of the inode data structure in hex and ASCII format.
434 The
435 .I \-b
436 option causes the command to only dump the contents of the
437 .B i_blocks
438 array. The
439 .I \-e
440 option causes the command to only dump the contents of the extra inode
441 space, which is used to store in-line extended attributes. The
442 .I \-x
443 option causes the command to dump the extra inode space interpreted and
444 extended attributes. This is useful to debug corrupted inodes
445 containing extended attributes.
446 .TP
447 .BI imap " filespec"
448 Print the location of the inode data structure (in the inode table)
449 of the inode
450 .IR filespec .
451 .TP
452 .BI init_filesys " device blocksize"
453 Create an ext2 file system on
454 .I device
455 with device size
456 .IR blocksize .
457 Note that this does not fully initialize all of the data structures;
458 to do this, use the
459 .BR mke2fs (8)
460 program. This is just a call to the low-level library, which sets up
461 the superblock and block descriptors.
462 .TP
463 .BI journal_close
464 Close the open journal.
465 .TP
466 .BI journal_open " [-c] [-v ver] [-f ext_jnl]
467 Opens the journal for reading and writing. Journal checksumming can
468 be enabled by supplying \fI-c\fR; checksum formats 2 and 3 can be
469 selected with the \fI-v\fR option. An external journal can be loaded
470 from \fIext_jnl\fR.
471 .TP
472 .BI journal_run
473 Replay all transactions in the open journal.
474 .TP
475 .BI journal_write " [-b blocks] [-r revoke] [-c] file
476 Write a transaction to the open journal. The list of blocks to write
477 should be supplied as a comma-separated list in \fIblocks\fR; the
478 blocks themselves should be readable from \fIfile\fR. A list of
479 blocks to revoke can be supplied as a comma-separated list in
480 \fIrevoke\fR. By default, a commit record is written at the end; the
481 \fI-c\fR switch writes an uncommitted transaction.
482 .TP
483 .BI kill_file " filespec"
484 Deallocate the inode
485 .I filespec
486 and its blocks. Note that this does not remove any directory
487 entries (if any) to this inode. See the
488 .BR rm (1)
489 command if you wish to unlink a file.
490 .TP
491 .BI lcd " directory"
492 Change the current working directory of the
493 .B debugfs
494 process to
495 .I directory
496 on the native file system.
497 .TP
498 .BI list_quota " quota_type"
499 Display quota information for given quota type (user, group, or project).
500 .TP
501 .BI ln " filespec dest_file"
502 Create a link named
503 .I dest_file
504 which is a hard link to
505 .IR filespec .
506 Note this does not adjust the inode reference counts.
507 .TP
508 .BI logdump " [-acsOS] [-b block] [-n num_trans ] [-i filespec] [-f journal_file] [output_file]"
509 Dump the contents of the ext3 journal. By default, dump the journal inode as
510 specified in the superblock. However, this can be overridden with the
511 .I \-i
512 option, which dumps the journal from the internal inode given by
513 .IR filespec .
514 A regular file containing journal data can be specified using the
515 .I \-f
516 option. Finally, the
517 .I \-s
518 option utilizes the backup information in the superblock to locate the
519 journal.
520 .IP
521 The
522 .I \-S
523 option causes
524 .B logdump
525 to print the contents of the journal superblock.
526 .IP
527 The
528 .I \-a
529 option causes the
530 .B logdump
531 to print the contents of all of the descriptor blocks.
532 The
533 .I \-b
534 option causes
535 .B logdump
536 to print all journal records that refer to the specified block.
537 The
538 .I \-c
539 option will print out the contents of all of the data blocks selected by
540 the
541 .I \-a
542 and
543 .I \-b
544 options.
545 .IP
546 The
547 .I \-O
548 option causes logdump to display old (checkpointed) journal entries.
549 This can be used to try to track down journal problems even after the
550 journal has been replayed.
551 .IP
552 The
553 .I \-n
554 option causes
555 .B logdump
556 to continue past a journal block which is missing a magic number.
557 Instead, it will stop only when the entire log is printed or after
558 .I num_trans
559 transactions.
560 .TP
561 .BI ls " [-l] [-c] [-d] [-p] [-r] filespec"
562 Print a listing of the files in the directory
563 .IR filespec .
564 The
565 .I \-c
566 flag causes directory block checksums (if present) to be displayed.
567 The
568 .I \-d
569 flag will list deleted entries in the directory.
570 The
571 .I \-l
572 flag will list files using a more verbose format.
573 The
574 .I \-p
575 flag will list the files in a format which is more easily parsable by
576 scripts, as well as making it more clear when there are spaces or other
577 non-printing characters at the end of filenames.
578 The
579 .I \-r
580 flag will force the printing of the filename, even if it is encrypted.
581 .TP
582 .BI list_deleted_inodes " [limit]"
583 List deleted inodes, optionally limited to those deleted within
584 .I limit
585 seconds ago. Also available as
586 .BR lsdel .
587 .IP
588 This command was useful for recovering from accidental file deletions
589 for ext2 file systems. Unfortunately, it is not useful for this purpose
590 if the files were deleted using ext3 or ext4, since the inode's
591 data blocks are no longer available after the inode is released.
592 .TP
593 .BI modify_inode " filespec"
594 Modify the contents of the inode structure in the inode
595 .IR filespec .
596 Also available as
597 .BR mi .
598 .TP
599 .BI mkdir " filespec"
600 Make a directory.
601 .TP
602 .BI mknod " filespec [p|[[c|b] major minor]]"
603 Create a special device file (a named pipe, character or block device).
604 If a character or block device is to be made, the
605 .I major
606 and
607 .I minor
608 device numbers must be specified.
609 .TP
610 .BI ncheck " [-c] inode_num ..."
611 Take the requested list of inode numbers, and print a listing of pathnames
612 to those inodes. The
613 .I -c
614 flag will enable checking the file type information in the directory
615 entry to make sure it matches the inode's type.
616 .TP
617 .BI open " [-weficD] [-b blocksize] [-d image_filename] [-s superblock] [-z undo_file] device"
618 Open a file system for editing. The
619 .I -f
620 flag forces the file system to be opened even if there are some unknown
621 or incompatible file system features which would normally
622 prevent the file system from being opened. The
623 .I -e
624 flag causes the file system to be opened in exclusive mode. The
625 .IR -b ", " -c ", " -d ", " -i ", " -s ", " -w ", and " -D
626 options behave the same as the command-line options to
627 .BR debugfs .
628 .TP
629 .BI punch " filespec start_blk [end_blk]"
630 Delete the blocks in the inode ranging from
631 .I start_blk
632 to
633 .IR end_blk .
634 If
635 .I end_blk
636 is omitted then this command will function as a truncate command; that
637 is, all of the blocks starting at
638 .I start_blk
639 through to the end of the file will be deallocated.
640 .TP
641 .BI symlink " filespec target"
642 Make a symbolic link.
643 .TP
644 .B pwd
645 Print the current working directory.
646 .TP
647 .B quit
648 Quit
649 .B debugfs
650 .TP
651 .BI rdump " directory[...] destination"
652 Recursively dump
653 .IR directory ,
654 or multiple
655 .IR directories ,
656 and all its contents (including regular files, symbolic links, and other
657 directories) into the named
658 .IR destination ,
659 which should be an existing directory on the native file system.
660 .TP
661 .BI rm " pathname"
662 Unlink
663 .IR pathname .
664 If this causes the inode pointed to by
665 .I pathname
666 to have no other references, deallocate the file. This command functions
667 as the unlink() system call.
668 .I
669 .TP
670 .BI rmdir " filespec"
671 Remove the directory
672 .IR filespec .
673 .TP
674 .BI setb " block [count]"
675 Mark the block number
676 .I block
677 as allocated.
678 If the optional argument
679 .I count
680 is present, then
681 .I count
682 blocks starting at block number
683 .I block
684 will be marked as allocated.
685 .TP
686 .BI set_block_group " bgnum field value"
687 Modify the block group descriptor specified by
688 .I bgnum
689 so that the block group descriptor field
690 .I field
691 has value
692 .IR value .
693 Also available as
694 .BR set_bg .
695 .TP
696 .BI set_current_time " time"
697 Set current time in seconds since Unix epoch to use when setting file system
698 fields.
699 .TP
700 .BI seti " filespec [num]"
701 Mark inode
702 .I filespec
703 as in use in the inode bitmap. If
704 .I num
705 is specified, also set num-1 inodes after the specified inode.
706 .TP
707 .BI set_inode_field " filespec field value"
708 Modify the inode specified by
709 .I filespec
710 so that the inode field
711 .I field
712 has value
713 .I value.
714 The list of valid inode fields which can be set via this command
715 can be displayed by using the command:
716 .B set_inode_field -l
717 Also available as
718 .BR sif .
719 .TP
720 .BI set_mmp_value " field value"
721 Modify the multiple-mount protection (MMP) data so that the MMP field
722 .I field
723 has value
724 .I value.
725 The list of valid MMP fields which can be set via this command
726 can be displayed by using the command:
727 .B set_mmp_value -l
728 Also available as
729 .BR smmp .
730 .TP
731 .BI set_super_value " field value"
732 Set the superblock field
733 .I field
734 to
735 .I value.
736 The list of valid superblock fields which can be set via this command
737 can be displayed by using the command:
738 .B set_super_value -l
739 Also available as
740 .BR ssv .
741 .TP
742 .B show_debugfs_params
743 Display
744 .B debugfs
745 parameters such as information about currently opened file system.
746 .TP
747 .BI show_super_stats " [-h]"
748 List the contents of the super block and the block group descriptors. If the
749 .I -h
750 flag is given, only print out the superblock contents. Also available as
751 .BR stats .
752 .TP
753 .BI stat " filespec"
754 Display the contents of the inode structure of the inode
755 .IR filespec .
756 .TP
757 .B supported_features
758 Display file system features supported by this version of
759 .BR debugfs .
760 .TP
761 .BI testb " block [count]"
762 Test if the block number
763 .I block
764 is marked as allocated in the block bitmap.
765 If the optional argument
766 .I count
767 is present, then
768 .I count
769 blocks starting at block number
770 .I block
771 will be tested.
772 .TP
773 .BI testi " filespec"
774 Test if the inode
775 .I filespec
776 is marked as allocated in the inode bitmap.
777 .TP
778 .BI undel " <inode_number> [pathname]"
779 Undelete the specified inode number (which must be surrounded by angle
780 brackets) so that it and its blocks are marked in use, and optionally
781 link the recovered inode to the specified pathname. The
782 .B e2fsck
783 command should always be run after using the
784 .B undel
785 command to recover deleted files.
786 .IP
787 Note that if you are recovering a large number of deleted files, linking
788 the inode to a directory may require the directory to be expanded, which
789 could allocate a block that had been used by one of the
790 yet-to-be-undeleted files. So it is safer to undelete all of the
791 inodes without specifying a destination pathname, and then in a separate
792 pass, use the debugfs
793 .B link
794 command to link the inode to the destination pathname, or use
795 .B e2fsck
796 to check the file system and link all of the recovered inodes to the
797 lost+found directory.
798 .TP
799 .BI unlink " pathname"
800 Remove the link specified by
801 .I pathname
802 to an inode. Note this does not adjust the inode reference counts.
803 .TP
804 .BI write " source_file out_file"
805 Copy the contents of
806 .I source_file
807 into a newly-created file in the file system named
808 .IR out_file .
809 .TP
810 .BI zap_block " [-f filespec] [-o offset] [-l length] [-p pattern] block_num"
811 Overwrite the block specified by
812 .I block_num
813 with zero (NUL) bytes, or if
814 .I -p
815 is given use the byte specified by
816 .IR pattern .
817 If
818 .I -f
819 is given then
820 .I block_num
821 is relative to the start of the file given by
822 .IR filespec .
823 The
824 .I -o
825 and
826 .I -l
827 options limit the range of bytes to zap to the specified
828 .I offset
829 and
830 .I length
831 relative to the start of the block.
832 .TP
833 .BI zap_block " [-f filespec] [-b bit] block_num"
834 Bit-flip portions of the physical
835 .IR block_num .
836 If
837 .I -f
838 is given, then
839 .I block_num
840 is a logical block relative to the start of
841 .IR filespec .
842 .SH ENVIRONMENT VARIABLES
843 .TP
844 .B DEBUGFS_PAGER, PAGER
845 The
846 .B debugfs
847 program always pipes the output of the some commands through a
848 pager program. These commands include:
849 .IR show_super_stats " (" stats ),
850 .IR list_directory " (" ls ),
851 .IR show_inode_info " (" stat ),
852 .IR list_deleted_inodes " (" lsdel ),
853 and
854 .IR htree_dump .
855 The specific pager can explicitly specified by the
856 .B DEBUGFS_PAGER
857 environment variable, and if it is not set, by the
858 .B PAGER
859 environment variable.
860 .IP
861 Note that since a pager is always used, the
862 .BR less (1)
863 pager is not particularly appropriate, since it clears the screen before
864 displaying the output of the command and clears the output the screen
865 when the pager is exited. Many users prefer to use the
866 .BR less (1)
867 pager for most purposes, which is why the
868 .B DEBUGFS_PAGER
869 environment variable is available to override the more general
870 .B PAGER
871 environment variable.
872 .SH AUTHOR
873 .B debugfs
874 was written by Theodore Ts'o <tytso@mit.edu>.
875 .SH SEE ALSO
876 .BR dumpe2fs (8),
877 .BR tune2fs (8),
878 .BR e2fsck (8),
879 .BR mke2fs (8),
880 .BR ext4 (5)