免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 820 | 回复: 1
打印 上一主题 下一主题

[文本处理] 8129 字节 文件夹 [复制链接]

论坛徽章:
6
程序设计版块每日发帖之星
日期:2016-05-11 06:20:00操作系统版块每日发帖之星
日期:2016-05-12 06:20:00每日论坛发贴之星
日期:2016-05-12 06:20:00操作系统版块每日发帖之星
日期:2016-05-14 06:20:00程序设计版块每日发帖之星
日期:2016-05-31 06:20:00每日论坛发贴之星
日期:2016-05-31 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-10-11 18:41 |只看该作者 |倒序浏览
d---rwxr-x    2 1000     1015          8192 Oct 10 11:27 apt1/
d---rwxr-x    2 1000     1015          8192 Jul 13 05:33 funcbin/
d---rwxr-x    2 1000     1015          8192 Oct 11 07:36 ish/
d---rwxr-x    2 1000     1015          8192 Aug  3 23:47 jar/
----rwxr-x    1 1000     1015       1564560 Aug  5 01:33 make-3.81.tar.gz*
d---rwxr-x    8 1000     1015          8192 Aug  5 02:14 make-4.2/
----rwxr-x    1 1000     1015       1974108 Aug  5 02:06 make-4.2.tar.gz*
d---rwxr-x    2 1000     1015          8192 Aug 10 19:48 miui-app/
d---rwxr-x    2 1000     1015          8192 Jul 14 11:22 mk1/
d---rwxr-x    2 1000     1015          8192 Sep 17 15:36 nl/
----rwxr-x    1 1000     1015      11835392 Oct  2  2013 recovery.img.tar*
d---rwxr-x    2 1000     1015          8192 Aug  4 15:21 roo/

新文件夹也是8192


论坛徽章:
2
程序设计版块每日发帖之星
日期:2015-09-07 06:20:00程序设计版块每日发帖之星
日期:2015-09-07 06:20:00
2 [报告]
发表于 2016-10-11 21:19 |只看该作者
  1. [root@CentOS_6 boot]# df -h
  2. Filesystem            Size  Used Avail Use% Mounted on
  3. /dev/sda5             1.9G  546M  1.3G  30% /
  4. tmpfs                 491M     0  491M   0% /dev/shm
  5. /dev/sda1             190M   49M  131M  28% /boot
  6. /dev/mapper/server-myhome
  7.                       6.7G   12M  6.4G   1% /home
  8. /dev/sda3             3.8G  1.8G  1.9G  50% /usr
复制代码

  1. [root@CentOS_6 ~]# mkdir test
  2. [root@CentOS_6 ~]# ll -d test
  3. drwxr-xr-x. 2 root root 4096 10月 12 01:06 test
  4. [root@CentOS_6 ~]# df -h /root
  5. Filesystem      Size  Used Avail Use% Mounted on
  6. /dev/sda5       1.9G  546M  1.3G  30% /
  7. [root@CentOS_6 ~]# dumpe2fs -h /dev/sda5
  8. dumpe2fs 1.41.12 (17-May-2010)
  9. Filesystem volume name:   <none>
  10. Last mounted on:          /
  11. Filesystem UUID:          ddbe71db-de49-48cf-84a0-84a745f32518
  12. Filesystem magic number:  0xEF53
  13. Filesystem revision #:    1 (dynamic)
  14. Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
  15. Filesystem flags:         signed_directory_hash
  16. Default mount options:    user_xattr acl
  17. Filesystem state:         clean
  18. Errors behavior:          Continue
  19. Filesystem OS type:       Linux
  20. Inode count:              128000
  21. Block count:              512000
  22. Reserved block count:     25600
  23. Free blocks:              356032
  24. Free inodes:              112065
  25. First block:              0
  26. Block size:               4096
复制代码

  1. [root@CentOS_6 ~]# cd /boot/
  2. [root@CentOS_6 boot]# mkdir test
  3. [root@CentOS_6 boot]# ll -d test/
  4. drwxr-xr-x. 2 root root 1024 10月 12 01:09 test/
  5. [root@CentOS_6 ~]# dumpe2fs -h /dev/sda1
  6. dumpe2fs 1.41.12 (17-May-2010)
  7. Filesystem volume name:   <none>
  8. Last mounted on:          /boot
  9. Filesystem UUID:          55bac577-fc34-4379-9697-6b340ac3d3a1
  10. Filesystem magic number:  0xEF53
  11. Filesystem revision #:    1 (dynamic)
  12. 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
  13. Filesystem flags:         signed_directory_hash
  14. Default mount options:    user_xattr acl
  15. Filesystem state:         clean
  16. Errors behavior:          Continue
  17. Filesystem OS type:       Linux
  18. Inode count:              51200
  19. Block count:              204800
  20. Reserved block count:     10240
  21. Free blocks:              144222
  22. Free inodes:              51156
  23. First block:              1
  24. Block size:               1024
复制代码


综上所述,由于每一个文件夹会占用block来存放目录内的数据的inode号码等信息,所以空文件夹默认就是一个block。而根据你的文件系统的定义,不同的block size并不相同。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP