为什么不“总计"?从 ls -l 加起来等于列出的总文件大小? [英] Why doesn't "total" from ls -l add up to total file sizes listed?
本文介绍了为什么不“总计"?从 ls -l 加起来等于列出的总文件大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么 ls -l
的输出中的 total 打印为 64
而不是 26078
列出的所有文件的总数?
Why is the total in the output of ls -l
printed as 64
and not 26078
which is the total of all files listed?
$ ls -l ~/test/ls
total 64
-rw-r--r-- 1 root root 15276 Oct 5 2004 a2ps.cfg
-rw-r--r-- 1 root root 2562 Oct 5 2004 a2ps-site.cfg
drwxr-xr-x 4 root root 4096 Feb 2 2007 acpi
-rw-r--r-- 1 root root 48 Feb 8 2008 adjtime
drwxr-xr-x 4 root root 4096 Feb 2 2007 alchemist
推荐答案
您可以在您的平台的 ls
文档中找到该行的定义.对于coreutils
ls
(在很多Linux系统上都可以找到),可以通过info coreutils ls
找到信息:
You can find the definition of that line in the ls
documentation for your platform. For coreutils
ls
(the one found on a lot of Linux systems), the information can be found via info coreutils ls
:
对于列出的每个目录,在文件前面加上一行`total BLOCKS',其中 BLOCKS 是所有磁盘分配的总和该目录中的文件.
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.
这篇关于为什么不“总计"?从 ls -l 加起来等于列出的总文件大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文