´ÙÀ½ ÀÌÀü Â÷·Ê

9. inodes ÀÇ ¼¼ºÎ °úÁ¤À» ¾ò´Â´Ù.

Debugfs ¿¡´Â inodeÀÇ ¼¼ºÎ»çÇ×À» Ãâ·ÂÇÏ´Â 'stat'¸í·ÉÀÌ ÀÖ´Ù. ÀÌ´Â º¹±¸ ¸ñ·Ï¿¡ ÀÖ´Â °¢ inode ¸¦ ¹ßÇàÇÑ´Ù. ¿¹¸¦µé¾î ÀÚÁÖ »ç¿ëÇÏ´Â inode ¹øÈ£°¡ 148003 À̶ó¸é ´ÙÀ½°ú °°ÀÌ Çغ¸ÀÚ.


 
  debugfs:  stat <148003>
    Inode: 148003   Type: regular  Mode:  0644  Flags: 0x0  Version: 1
    User:   503   Group:   100   Size: 6065
    File ACL: 0    Directory ACL: 0
    Links: 0   Blockcount: 12
    Fragment:  Address: 0    Number: 0    Size: 0
    ctime: 0x31a9a574 -- Mon May 27 13:52:04 1996
    atime: 0x31a21dd1 -- Tue May 21 20:47:29 1996
    mtime: 0x313bf4d7 -- Tue Mar  5 08:01:27 1996
    dtime: 0x31a9a574 -- Mon May 27 13:52:04 1996
    BLOCKS:
    594810 594811 594814 594815 594816 594817 
    TOTAL: 6

º¹±¸ÇÒ È­ÀÏÀÌ ¸¹´Ù¸é À§ÀÇ °ÍÀÌ ÀÚµ¿ÀûÀ¸·Î µÇ±æ ¹Ù¶ö °ÍÀÌ´Ù. º¹±¸ÇÒ inodes 'lsdel' ¸ñ·ÏÀÌ 'list'¿¡ ÀÖ´Ù °¡Á¤ÇÏ°í ´ÙÀ½°ú °°ÀÌ Çغ¸ÀÚ.

# cut -c1-6 list | grep "[0-9]" | tr -d " " > inodes ÀÌ È­ÀÏÀÇ 'inodes'¸¦ ³ªÁß¿¡ Æí¸®ÇÏ°Ô ÇϱâÀ§ÇØ º¹±¸ÇÒ inodesÀÇ ¹øÈ£¸¦ ÁÙ¸¶´Ù Çϳª¾¿ Æ÷ÇÔÇØ ÀúÀåÇß¾ú´Ù. ±×¸®°í ³ª¼­ ´ÙÀ½°ú °°ÀÌ Çغ¸ÀÚ.

# sed 's/^.*$/stat <\0>/' inodes | debugfs /dev/hda5 > stats ¿©±â¼­ 'stats'´Â ¸ðµç 'stat' ¸í·ÉÀÇ Ãâ·ÂÀ» Æ÷ÇÔÇÑ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê