summaryrefslogtreecommitdiff
path: root/debugfs/debugfs.8
blob: 8bb0a7494f47b7c64507f73de765f4c7d1fc1564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.\" -*- nroff -*-
.TH DEBUGFS 8 "November 1994" "Version 0.5b"
.SH NAME
debugfs \- ext2 file system debugger
.SH SYNOPSIS
.B debugfs
[
[
.B \-w
]
device
]
.SH DESCRIPTION
.B debugfs
is a file system debugger. It can be used to examine and change the
state of an ext2 file system.
.br
.I device
is the special file corresponding to the device containing the ext2
file system (e.g /dev/hdXX).
.SH OPTIONS
.TP
.I -w
Specify that the file system should be open in read-write mode. Without this
option, the file system is open in read-only mode.
.SH COMMANDS
.B debugfs
is an interactive debugger. It understands a number of commands.
.TP
.I cd file
.TP
.I chroot file
.TP
.I close
Close the currently open file system.
.TP
.I clri file
Clear the contents of the inode corresponding to
.I file
.TP
.I expand_dir, file
Expand a directory.
.TP
.I find_free_block [goal]
Find the first free block, starting from
.I goal
and allocates it.
.TP
.I find_free_inode [dir [mode]]
Find a free inode and allocates it.
.TP
.I freeb block
Mark the block as not allocated.
.TP
.I freei file
Free the inode corresponding to
.I file
.TP
.I help
.TP
.I iname inode
Print the file name corresponding to
.I inode
(currently not implemented).
.TP
.I initialize device blocksize
Create an ext2 file system on
.I device
.TP
.I kill_file file
Remove a file and deallocates its blocks.
.TP
.I ln source_file dest_file
Create a link.
.TP
.I ls [pathname]
Emulate the
.BR ls (1)
command.
.TP
.I modify_inode file
Modify the contents of the inode corresponding to
.I file
.TP
.I mkdir file
Make a directory.
.TP
.I open [-w] device
Open a file system.
.TP
.I pwd
.TP
.I quit
Quit
.B debugfs
.TP
.I rm file
Remove a file.
.TP
.I rmdir file
Remove a directory.
.TP
.I setb block
Mark the block as allocated.
.TP
.I seti file
Mark in use the inode corresponding to
.I file
.TP
.I show_super_stats
List the contents of the super block.
.TP
.I stat file
Dump the contents of the inode corresponding to
.I file
.TP
.I testb block
Test if the block is marked as allocated.
.TP
.I testi file
Test if the inode correponding to
.I file
is marked as allocated.
.TP
.I unlink file
Remove a link.
.SH AUTHOR
.B debugfs
has been written by Theodore T'so <tytso@mit.edu>.
.SH SEE ALSO
.BR dumpe2fs (8),
.BR e2fsck (8),
.BR mke2fs (8)