why is the output of `du` often so different from `du -b`

后端 未结 5 2076
温柔的废话
温柔的废话 2020-11-29 05:47

why is the output of du often so different from du -b? -b is shorthand for --apparent-size --block-size=1. only using

5条回答
  •  没有蜡笔的小新
    2020-11-29 06:11

    Because by default du gives disk usage, which is the same or larger than the file size. As said under --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
    

提交回复
热议问题