## |
Command |
Available? |
Description |
Owner |
1 |
bmap filespec logical_block |
Yes (r1232) |
Print the physical block number corresponding to the logical block number logical_block in the inode filespec |
|
2 |
cat filespec |
Yes |
Dump the contents of the inode filespec to stdout |
Sunil |
3 |
cd filespec |
Yes |
Change the current working directory to filespec |
Sunil |
4 |
chroot filespec |
Yes |
Change the root directory to be the directory filespec |
Sunil |
5 |
close |
Yes |
Close the currently open file system |
Sunil |
6 |
clri file |
No |
Clear the contents of the inode file |
? |
7 |
dump [-p] filspec out_file |
Yes |
Dump the contents of the inode filespec to the output file out_file. If the -p option is given set the owner, group and permissions information on out_file to match filespec |
Sunil |
8 |
expand_dir filespec |
No |
Expand the directory filespec |
? |
9 |
feature [fs_feature] [-fs_feature] ... |
No |
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 |
? |
10 |
find_free_block [count [goal]] |
No |
Find the first count free blocks, starting from goal and allocate it |
? |
11 |
find_free_inode [dir [mode]] |
No |
Find a free inode and allocate it. If present, dir specifies the inode number of the directory which the inode is to be located. The second optional argument mode specifies the permissions of the new inode. (If the directory bit is set on the mode, the allocation routine will function differently.) |
? |
12 |
freeb block [count] |
No |
Mark the block number block as not allocated. If the optional argument count is present, then count blocks starting at block number block will be marked as not allocated |
? |
13 |
freei filespec |
No |
Free the inode specified by filespec |
? |
14 |
help |
Yes |
Print a list of commands understood by debugfs(8) |
Sunil |
15 |
icheck block ... |
Yes (r1273) |
Print a listing of the inodes which use the one or more blocks specified on the command line |
|
16 |
imap filespec |
NA |
Print the location of the inode data structure (in the inode table) of the inode filespec |
? |
17 |
init_filesys device blocksize |
No |
Create an ext2 file system on device with device size blocksize. Note that this does not fully initialize all of the data structures; to do this, use the mke2fs(8) program. This is just a call to the low-level library, which sets up the superblock and block descriptors |
? |
18 |
kill_file filespec |
No |
Deallocate the inode filespec and its blocks. Note that this does not remove any directory entries (if any) to this inode. See the rm(1) command if you wish to unlink a file |
? |
19 |
lcd directory |
Yes |
Change the current working directory of the debugfs process to directory on the native filesystem |
Sunil |
20 |
ln filespec dest_file |
No |
Create a link named dest_file which is a link to filespec. Note this does not adjust the inode reference counts |
? |
21 |
logdump [-acs] [-b<block>] [-i<filespec>] [-f<journal_file>] [output_file] |
Yes |
Dump the contents of the ext3 journal. By default, the journal inode as specified in the superblock. However, this can be overridden with the -i option, which uses an inode specifier to specify the journal to be used. A file containing journal data can be specified using the -f option. Finally, the -s option utilizes the backup information in the superblock to locate the journal. The -a option causes the logdump program to print the contents of all of the descriptor blocks. The -b option causes log-dump to print all journal records that are refer to the specified block. The -c option will print out the contents of all of the data blocks selected by the -a and -b options. |
Sunil |
22 |
ls [-l] [-d] filespec |
Partial |
Print a listing of the files in the directory filespec. The -l flag will list files using a more verbose format. The -d flag will list deleted entries in the directory |
Sunil |
23 |
modify_inode filespec |
No |
Modify the contents of the inode structure in the inode filespec |
? |
24 |
mkdir filespec |
No |
Make a directory |
? |
25 |
mknod filespec [p|[[c|b] major minor]] |
No |
Create a special device file (a named pipe, character or block device). If a character or block device is to be made, the major and minor device numbers must be specified |
? |
26 |
ncheck inode_num ... |
Yes |
Take the requested list of inode numbers, and print a listing of pathnames to those inodes |
Sunil |
27 |
open [-w] [-f] [-i] [-c] [-b blocksize] [-s superblock] device |
Partial |
Open a filesystem for editing. The -w flag causes the filesystem to be opened for writing. The -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 -c, -b, -i, and -s options behave the same as those to debugfs itself. |
Sunil |
28 |
pwd |
No |
Print the current working directory |
? |
29 |
quit |
Yes |
Quit debugfs |
Sunil |
30 |
rdump directory destination |
Yes |
Recursively dump directory and all its contents (including regular files, symbolic links, and other directories) into the named destination which should be an existing directory on the native filesystem. |
Sunil |
31 |
rm pathname |
No |
Unlink pathname. If this causes the inode pointed to by pathname to have no other references, deallocate the file. This command functions as the unlink() system call. |
? |
32 |
rmdir filespec |
No |
Remove the directory filespec |
? |
33 |
setb block [count] |
No |
Mark the block number block as allocated. If the optional argument count is present, then count blocks starting at block number block will be marked as allocated. |
? |
34 |
seti filespec |
No |
Mark inode filespec as in use in the inode bitmap |
? |
35 |
set_inode_field filespec field value |
No |
Modify the inode specified by filespec so that the inode field field has value value. The list of valid inode fields which can be set via this command can be displayed by using the command: set_inode_field -l |
? |
36 |
set_super_value field value |
No |
Set the superblock field field to value. The list of valid superblock fields which can be set via this command can be displayed by using the command: set_super_value -l |
? |
37 |
show_super_stats [-h] |
Yes |
List the contents of the super block and the block group descriptors. If the -h flag is given, only print out the superblock contents. |
Sunil |
38 |
stat filespec |
Yes |
Display the contents of the inode structure of the inode filespec. |
Sunil |
39 |
testb block [count] |
No |
Test if the block number block is marked as allocated in the block bitmap. If the optional argument count is present, then count blocks starting at block number block will be tested. |
? |
40 |
testi filespec |
No |
Test if the inode filespec is marked as allocated in the inode bitmap. |
? |
41 |
unlink pathname |
No |
Remove the link specified by pathname to an inode. Note this does not adjust the inode reference counts. |
? |
42 |
write source_file out_file |
No |
Create a file in the filesystem named out_file, and copy the contents of source_file into the destination file. |
? |