강좌
클라우드/리눅스에 관한 강좌입니다.
리눅스 분류

파일시스템 디버거 debugfs전용명령어의 사용도움말 보기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

파일시스템 디버거 debugfs전용명령어의 사용도움말 보기





 

debugfs명령어모드에서 사용할 수 있는 debugfs전용명령어는 50개 이상입니다.

 

 

 

이들 50개 이상의 명령어들은 debugfs모드에서만 사용 가능한 것으로 파일시스템을 조작하는데 사용되는 debugfs전용명령어입니다.

 

 

 

debugfs모드로 들어간 후에 debugfs전용 사용도움말을 확인해 보려면 debugfs모드에서 “help”라고 하시면 됩니다.

 

 

 

 

 

다음 예와 같이 debugfs명령어 상태에서 “help”라고 하면 debugfs 모드에서 사용할 수 있는 명령어들과 함께 간단한 설명을 볼 수 있습니다.

 

 

 

 

 

[root@su250 sulinux]# debugfs

debugfs 1.41.3 (12-Oct-2008)

debugfs: 

debugfs:  help

Available debugfs requests:

 

show_debugfs_params, params     Show debugfs parameters

open_filesys, open       Open a filesystem

close_filesys, close     Close the filesystem

feature, features        Set/print superblock features

dirty_filesys, dirty     Mark the filesystem as dirty

init_filesys             Initalize a filesystem (DESTROYS DATA)

show_super_stats, stats  Show superblock statistics

ncheck                   Do inode->name translation

icheck                   Do block->inode translation

change_root_directory, chroot    Change root directory

change_working_directory, cd     Change working directory

list_directory, ls       List directory

show_inode_info, stat    Show inode information

link, ln                 Create directory link

unlink                   Delete a directory link

mkdir                    Create a directory

rmdir                    Remove a directory

rm                       Remove a file (unlink and kill_file, if appropriate)

kill_file                Deallocate an inode and its blocks

clri                     Clear an inode's contents

freei                    Clear an inode's in-use flag

seti                     Set an inode's in-use flag

testi                    Test an inode's in-use flag

freeb                    Clear a block's in-use flag

setb                     Set a block's in-use flag

testb                    Test a block's in-use flag

modify_inode, mi         Modify an inode by structure

find_free_block, ffb     Find free block(s)

find_free_inode, ffi     Find free inode(s)

print_working_directory, pwd      Print current working directory

expand_dir, expand       Expand directory

mknod                    Create a special file

list_deleted_inodes, lsdel     List deleted inodes

undelete, undel          Undelete file

write                    Copy a file from your native filesystem

dump_inode, dump         Dump an inode out to a file

cat                      Dump an inode out to stdout

lcd                      Change the current directory on your native filesystem

rdump                    Recursively dump a directory to the native filesystem

set_super_value, ssv     Set superblock value

set_inode_field, sif     Set inode field

set_block_group, set_bg  Set block group descriptor field

logdump                  Dump the contents of the journal

htree_dump, htree        Dump a hash-indexed directory

dx_hash, hash            Calculate the directory hash of a filename

dirsearch                Search a directory for a particular filename

bmap                     Calculate the logical->physical block mapping for an inode

imap                     Calculate the location of an inode

dump_unused              Dump unused blocks

set_current_time         Set current time to use when setting filesystme fields

supported_features       Print features supported by this version of e2fsprogs

help                     Display info on command or topic.

list_requests, lr, ?     List available commands.

quit, q                  Leave the subsystem.

debugfs: 

debugfs:

 

위의 예를 보면 debugfs에서 사용할 수 있는 debugfs전용명령어들이 모두 리스트 되어 있습니다.

 

 

 

리눅스에는 이와 같이 특정모드상태에서만 전용으로 사용하는 전용명령어들이 다수 존재합니다.

 

 

 

, 우리가 잘 알고 있는 ftp 모드 상태에서만 사용할 수 있는 ftp전용명령어, grub모드에서만 전용으로 사용하는 grub전용명령어 등이 있습니다.

 

 

 

그리고 이들 전용모드에서만 사용되는 전용명령어들을 배워야만 ftp, grub등을 제대로 다룰 수 있게 됩니다.

 

 

 

 

 

따라서 우리는 이번 장에서 리눅스의 ext2 ext3파일시스템을 자세히 살펴보고, 원하는 대로 다루기 위하여 debugfs에 대해서 공부해야 합니다.

 

 

 

그렇게 하기 위해서는 debugfs의 전용명령어들을 배워야 하는 것은 필수 중에 필수입니다.

 

 

 

 

 

이런 이유로 지금부터 설명되는 거의 모든 예들은 debugfs의 전용명령어들을 사용하여 파일시스템을 조작하거나 확인하거나 삭제파일을 다시 복구하는 등의 작업을 하게 됩니다.

 

 

 

물론, 설명에 사용된 모든 예들은 실 상황을 예로 든 것으로 시스템관리를 하는 여러분들에게 큰 도움이 되리라 생각합니다.

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,810 개
  • 현재 접속자 :  85 명