Chinaunix

标题: 在一个目录下ls -l 这个total 后的值是什么意思? [打印本页]

作者: gumuzhiyu    时间: 2011-11-23 20:30
标题: 在一个目录下ls -l 这个total 后的值是什么意思?
经常使用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统计的是什么?以前都以为是统计的文件个数,今天发现不对啊,求大神指导。。。
作者: Shell_HAT    时间: 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.




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2