Linux中查看“inode”信息
如下:
1 2 3 |
[root@node2 /]# ls -ldi /backup/ 3489057 drwxr-xr-x 3 root root 4096 May 31 09:00 /backup/ [root@node2 /]# |
查看节点“3489057”的信息:
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 |
[root@node2 /]# ext3grep /dev/mapper/VolGroup00-LogVol00 --inode 3489057 --print Running ext3grep version 0.7.0 WARNING: I don't know what EXT3_FEATURE_COMPAT_EXT_ATTR is. WARNING: EXT3_FEATURE_INCOMPAT_RECOVER is set. This either means that your partition is still mounted, and/or the file system is in an unclean state. Number of groups: 144 Minimum / maximum journal block: 2052 / 36900 Loading journal descriptors... sorting... done Journal transaction 22479 wraps around, some data blocks might have been lost of this transaction. Number of descriptors in journal: 31663; min / max sequence numbers: 21968 / 23005 Hex dump of inode 3489057: 0000 | 00 90 f2 aa 3f 2b 00 00 6b 00 00 00 ff 7f 00 00 | ....?+..k....... 0010 | 80 03 af aa 3f 2b 00 00 00 00 00 00 00 00 00 00 | ....?+.......... 0020 | 00 40 80 00 00 00 00 00 00 00 00 00 00 00 00 00 | .@.............. 0030 | 00 10 00 00 00 00 00 00 10 78 69 00 00 00 00 00 | .........xi..... 0040 | 10 78 69 00 00 00 00 00 00 00 00 00 00 00 00 00 | .xi............. 0050 | 00 12 00 00 00 00 00 00 16 7e a6 ab 32 00 00 00 | .........~..2... 0060 | 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................ 0070 | 90 61 51 94 ff 7f 00 00 7e 97 a6 ab 32 00 00 00 | .aQ.....~...2... Inode is Allocated Group: 107 Generation Id: 733318915 uid / gid: 0 / 0 mode: drwxr-xr-x size: 4096 num of links: 3 sectors: 8 (--> 0 indirect blocks). Inode Times: Accessed: 1369982129 = Fri May 31 14:35:29 2013 File Modified: 1369962023 = Fri May 31 09:00:23 2013 Inode Modified: 1369962023 = Fri May 31 09:00:23 2013 Deletion time: 0 Direct Blocks: 3514368 Loading VolGroup00-LogVol00.ext3grep.stage2... WARNING: Rejecting a dir_entry (block 83992) because it contains legal but unlikely characters. Use --ls --block 83992 to examine this possible directory block. If it looks like a directory to you, and '\020' looks like a filename that might belong in that directory, then add --accept='\020' as commandline parameter AND remove both stage* files! WARNING: Rejecting a dir_entry (block 83992) because it contains legal but unlikely characters. Use --ls --block 83992 to examine this possible directory block. If it looks like a directory to you, and '\024' looks like a filename that might belong in that directory, then add --accept='\024' as commandline parameter AND remove both stage* files! WARNING: Rejecting a dir_entry (block 84037) because it contains legal but unlikely characters. Use --ls --block 84037 to examine this possible directory block. If it looks like a directory to you, and '\030' looks like a filename that might belong in that directory, then add --accept='\030' as commandline parameter AND remove both stage* files! WARNING: Rejecting a dir_entry (block 84037) because it contains legal but unlikely characters. Use --ls --block 84037 to examine this possible directory block. If it looks like a directory to you, and '\f' looks like a filename that might belong in that directory, then add --accept='\f' as commandline parameter AND remove both stage* files! ... WARNING: Rejecting a dir_entry (block 84317) because it contains legal but unlikely characters. Use --ls --block 84317 to examine this possible directory block. If it looks like a directory to you, and '\034' looks like a filename that might belong in that directory, then add --accept='\034' as commandline parameter AND remove both stage* files! ..................................................................................................................... done The first block of the directory is 3514368. Inode 3489057 is directory "backup". Directory block 3514368: .-- File type in dir_entry (r=regular file, d=directory, l=symlink) | .-- D: Deleted ; R: Reallocated Indx Next | Inode | Deletion time Mode File name ==========+==========+----------------data-from-inode------+-----------+========= 0 1 d 3489057 drwxr-xr-x . 1 2 d 2 drwxr-xr-x .. 2 3 d 3489058 drwxr-xr-x backup 3 end r 3489063 rrw-r--r-- root.img [root@node2 /]# |
“/backup”下的内容:
1 2 3 4 5 6 7 |
[root@node2 /]# ls /backup/ backup root.img [root@node2 /]# ll /backup/ total 6297616 drwxr-xr-x 5 root root 4096 May 30 15:51 backup -rw-r--r-- 1 root root 6442450944 May 31 09:10 root.img [root@node2 /]# |
——————————————————
Done。