同一个 du 运行的结果竟然不同? du -hs / du -h --max-depth=1 有啥区别?
ncdu 子文件夹的大小总和竟然大于 total ?
如何复现:
- 安装 anaconda
- conda create --name py35 --clone root
有一种东西叫 man
ncdu 貌似是因为 hard links 的 bug :
BUGS
Directory hard links are not supported. They will not be detected as being hard links, and will thus be scanned and counted multiple times.
du 是为什么么?-d/-s 会影响大小计算?
-d, --max-depth=N
print the total for a directory (or file, with --all) only if it is N or fewer levels below the command
line argument; --max-depth=0 is the same as --summarize
-s, --summarize
display only a total for each argument
貌似找到原因了,还是 SOF 靠谱~
http://stackoverflow.com/questions/19951883/du-counting-hardlinks-towards-filesize