Linux文件系統學習筆記-1

   在Linux中, 一切皆文件,不管是目錄,設備,套接字等均可以當作文件,並且每個文件對應一個inode號,這是一一對應的關係。node

[root@oracle ~]# ls -iloracle

總用量 2624ide

這個就是文件的inode號flex

 

539657 -rw-------. 1 root root    1835  3月  9 2013 anaconda-ks.cfgui

539664 drwxr-xr-x. 2 root root    4096 10月 26 01:44 c-projectspa

539670 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Desktopip

540968 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Documentshash

540965 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Downloadsit

523267 -rw-r--r--. 1 root root   58132  3月  9 2013 install.logio

523268 -rw-r--r--. 1 root root   10731  3月  9 2013 install.log.syslog

539809 -rwxr-xr-x. 1 root root     161  5月 16 06:33 iptables.sh

539839 -rw-r--r--. 1 root root  116172  2月 24 2013 libblkid-2.17.2-12.9.el6.x86_64.rpm

539838 -rw-r--r--. 1 root root  136420  2月 24 2013 libblkid-devel-2.17.2-12.9.el6.x86_64.rpm

539840 -rw-r--r--. 1 root root   68152  2月 24 2013 libuuid-2.17.2-12.9.el6.x86_64.rpm

539837 -rw-r--r--. 1 root root   84968  2月 24 2013 libuuid-devel-2.17.2-12.9.el6.x86_64.rpm

540969 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Music

540970 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Pictures

540967 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Public

539817 drwxr-xr-x. 8 root root    4096 10月 12 06:47 rpmbuild

540966 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Templates

540971 drwxr-xr-x. 2 root root    4096  5月 12 00:39 Videos

539788 -rw-r--r--. 1 root root  741004 10月 12 06:42 xfsprogs-3.1.1-4.1.x86_64.rpm

539815 -rw-r--r--. 1 root root 1400894 10月 12 06:46 xfsprogs-3.1.1-4.el6.src.rpm


 

經過stat命令,查看文件的具體信息

[root@oracle ~]# stat  anaconda-ks.cfg 

  File: "anaconda-ks.cfg"

  Size: 1835     Blocks: 8          IO Block: 4096   普通文件

Device: fd00h/64768dInode: 539657 這個inode信息與上面同樣     Links: 1

Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2013-03-09 10:34:37.821819313 +0800 文件訪問時間

Modify: 2013-03-09 10:34:37.945351959 +0800 文件修改時間

Change: 2013-03-09 10:34:46.132781083 +0800  

經過tunefs -l  /dev/sda1 命令,查看磁盤的詳細信息

 #tune2fs  -l /dev/sda1

tune2fs 1.41.12 (17-May-2010)

Filesystem volume name:   <none>

Last mounted on:          /boot

Filesystem UUID:          a9775a08-356f-456e-9ec1-50ae0121ff79

Filesystem magic number:  0xEF53

Filesystem revision #:    1 (dynamic)

Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize

Filesystem flags:         signed_directory_hash 

Default mount options:    user_xattr acl

Filesystem state:         clean

Errors behavior:          Continue

Filesystem OS type:       Linux

Inode count:              128016

Block count:              512000

Reserved block count:     25600

Free blocks:              462962

Free inodes:              127978

First block:              1

Block size:               1024

Fragment size:            1024

Reserved GDT blocks:      256

Blocks per group:         8192

Fragments per group:      8192

Inodes per group:         2032

Inode blocks per group:   254

Flex block group size:    16

Filesystem created:       Sat Mar  9 10:22:43 2013

Last mount time:          Tue Oct 29 05:30:19 2013

Last write time:          Tue Oct 29 05:30:19 2013

Mount count:              18

Maximum mount count:      -1

Last checked:             Sat Mar  9 10:22:43 2013

Check interval:           0 (<none>)

Lifetime writes:          46 MB

Reserved blocks uid:      0 (user root)

Reserved blocks gid:      0 (group root)

First inode:              11

Inode size:          128   #i節點大小

Journal inode:            8

Default directory hash:   half_md4

Directory Hash Seed:      b248bf99-3a1f-4b85-ab51-49701e6d8490

Journal backup:           inode blocks

相關文章
相關標籤/搜索