小编bao*_*han的帖子

find 命令的默认大小单位的用途 512 字节

find命令允许您按大小搜索,您可以使用man页面中拼写的单位指定大小:

File uses n units of space.  The following suffixes can be used:
  `b'    for 512-byte blocks (this is the default if no suffix is used)
  `c'    for bytes
  `w'    for two-byte words
  `k'    for Kilobytes (units of 1024 bytes)
  `M'    for Megabytes (units of 1048576 bytes)
  `G'    for Gigabytes (units of 1073741824 bytes)
Run Code Online (Sandbox Code Playgroud)

是否有历史原因b选择“块”而不是“字节”,我怀疑这将是更常见的假设?为什么会是默认的块而不是字节?什么时候以及为什么有人想要使用这个单位?转换为字节/千字节涉及一些数学运算,作为默认单位似乎不太方便。

defaults find history

8
推荐指数
1
解决办法
2577
查看次数

标签 统计

defaults ×1

find ×1

history ×1