Whamcloud - gitweb
Many files:
[tools/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 file system debugger
8 .SH SYNOPSIS
9 .B debugfs
10 [
11 [
12 .B \-w
13 ]
14 device
15 ]
16 .SH DESCRIPTION
17 .B debugfs
18 is a file system debugger. It can be used to examine and change the
19 state of an ext2 file system.
20 .br
21 .I device
22 is the special file corresponding to the device containing the ext2
23 file system (e.g /dev/hdXX).
24 .SH OPTIONS
25 .TP
26 .I -w
27 Specify that the file system should be open in read-write mode. Without this
28 option, the file system is open in read-only mode.
29 .SH COMMANDS
30 .B debugfs
31 is an interactive debugger. It understands a number of commands.
32 .TP
33 .I cat <file>
34 Dump the contents of an inode to stdout.
35 .TP
36 .I cd <directory>
37 Change the current working directory to specified directory
38 .TP
39 .I chroot <directory>
40 Change the root directory to be the specified inode.
41 .TP
42 .I close
43 Close the currently open file system.
44 .TP
45 .I clri <file>
46 Clear the contents of the inode corresponding to
47 .I file
48 .TP
49 .I dump <file> <out_file>
50 Dump the contents of an inode to a file.
51 .TP
52 .I expand_dir <file>
53 Expand a directory.
54 .TP
55 .I find_free_block [goal]
56 Find the first free block, starting from
57 .I goal
58 and allocates it.
59 .TP
60 .I find_free_inode [dir [mode]]
61 Find a free inode and allocates it.
62 .TP
63 .I freeb <block>
64 Mark the block as not allocated.
65 .TP
66 .I freei <file>
67 Free the inode corresponding to
68 .I file
69 .TP
70 .I help
71 Print a list of commands understood by 
72 .BR debugfs (8).
73 .TP
74 .I icheck <block>
75 Do block->inode translation.
76 .TP
77 .I iname <inode>
78 Print the file name corresponding to
79 .I inode
80 (currently not implemented - see ncheck).
81 .TP
82 .I initialize <device> <blocksize>
83 Create an ext2 file system on
84 .I device
85 .TP
86 .I kill_file <file>
87 Remove a file and deallocates its blocks.
88 .TP
89 .I ln <source_file> <dest_file>
90 Create a link.
91 .TP
92 .I ls [pathname]
93 Emulate the
94 .BR ls (1)
95 command.
96 .TP
97 .I modify_inode <file>
98 Modify the contents of the inode corresponding to
99 .I file
100 .TP
101 .I mkdir <file>
102 Make a directory.
103 .TP
104 .I mknod <file> [p|[[c|b] <major> <minor>]]
105 Create a special device file
106 .TP
107 .I ncheck <inode>
108 Do inode->name translation.
109 .TP
110 .I open [-w] <device>
111 Open a file system.
112 .TP
113 .I pwd
114 Print the current working directory.
115 .TP
116 .I quit
117 Quit
118 .B debugfs
119 .TP
120 .I rm <file>
121 Remove a file.
122 .TP
123 .I rmdir <directory>
124 Remove a directory.
125 .TP
126 .I setb <block>
127 Mark the block as allocated.
128 .TP
129 .I seti <file>
130 Mark in use the inode corresponding to
131 .I file
132 .TP
133 .I show_super_stats
134 List the contents of the super block.
135 .TP
136 .I stat <file>
137 Dump the contents of the inode corresponding to
138 .I file
139 .TP
140 .I testb <block>
141 Test if the block is marked as allocated.
142 .TP
143 .I testi <file>
144 Test if the inode correponding to
145 .I file
146 is marked as allocated.
147 .TP
148 .I unlink <file>
149 Remove a link.
150 .TP
151 .I write source_file <file>
152 Create a file in the filesystem named
153 .IR file ,
154 and copy the contents of
155 .I source_file
156 into the destination file.
157 .SH AUTHOR
158 .B debugfs
159 was written by Theodore Ts'o <tytso@mit.edu>.
160 .SH SEE ALSO
161 .BR dumpe2fs (8),
162 .BR e2fsck (8),
163 .BR mke2fs (8)