删除600字节以下的所有文件

arc*_*arc 0 unix shell

我已经看到有关如何删除特定文件大小下的所有文件的问题,但是没有一个文件处理过非常小的文件(我的大多数都是包含500-1200个字符的简单.txt文件).到目前为止,我见过的所有解决方案看起来都像

find . -size -1k -delete
Run Code Online (Sandbox Code Playgroud)

我尝试过使用以下内容:

find . -size -600
find . -size -600b
find . -size -0.6k
Run Code Online (Sandbox Code Playgroud)

没有一个工作,有人可以告诉我如何使这个方法适用于较小的文件大小?(我确定我在600之后错过了一个尾随的角色)

pax*_*blo 5

c是字节的大小说明符,它表示字符.b您可能认为可行的变体实际上是块(每个512字节).

所有内容都包含在联机帮助页中find:

-size n[cwbkMG]
    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)