免费注册 查看新帖 |

Chinaunix

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

在一个目录下ls -l 这个total 后的值是什么意思? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-23 20:30 |只看该作者 |倒序浏览
经常使用ls -l 查看当前目录下的东西,这个total统计的是什么?
比如:
root@root:~/home/test> ls -l
total 108
-rw-rw-r-- 1 root root   487 2011-11-22 20:23 admin.bat
-rw-rw-r-- 1 root root 13352 2011-11-22 20:23 admin.log
-rw-rw-r-- 1 root root  3550 2011-11-22 20:23 test.sh
-rw-rw-r-- 1 root root 38132 2011-11-22 20:23 test.log
-rw-rw-r-- 1 root root   522 2011-11-22 20:23 common.log
-rw-rw-r-- 1 root root 17406 2011-11-22 20:23 start.sh
-rw-rw-r-- 1 root root 17087 2011-11-22 20:23 message.log

其中这个total统计的是什么?以前都以为是统计的文件个数,今天发现不对啊,求大神指导。。。

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
2 [报告]
发表于 2011-11-23 20:56 |只看该作者
‘-l’
‘--format=long’
‘--format=verbose’
In addition to the name of each file, print the file type, file mode bits, number of hard links, owner name, group name, size, and timestamp (see Formatting file timestamps), normally the modification time. Print question marks for information that cannot be determined.
Normally the size is printed as a byte count without punctuation, but this can be overridden (see Block size). For example, -h prints an abbreviated, human-readable count, and ‘--block-size="'1"’ prints a byte count with the thousands separator of the current locale.

For each directory that is listed, preface the files with a line ‘total blocks’, where blocks is the total disk allocation for all files in that directory. The block size currently defaults to 1024 bytes, but this can be overridden (see Block size). The blocks computed counts each hard link separately; this is arguably a deficiency.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP