gpt4 book ai didi

du - du 如何以千字节为单位计算文件的大小?

转载 作者:行者123 更新时间:2023-12-04 16:49:50 29 4
gpt4 key购买 nike

我有一个文件du -b filename67108864作为答案(应该以字节为单位),
尽管du filename65604 (应该以千字节为单位)。
但是,它应该返回 67108864/1024 = 65536作为答案。
我查看了 du 的 man 条目,但找不到答案。
我错过了什么?
我在 64 位机器上运行 Ubuntu 12.04 版。

最佳答案

-b不仅仅是字节:

  -b, --bytes           equivalent to `--apparent-size --block-size=1'
--apparent-size print apparent sizes, rather than disk usage; although
the apparent size is usually smaller, it may be
larger due to holes in (`sparse') files, internal
fragmentation, indirect blocks, and the like

关于du - du 如何以千字节为单位计算文件的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23109160/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com