shell - Remove all files under 600 bytes -
i've seen questions how can remove files under file size, none of them have dealt small files (most of mine simple .txt files contain 500-1200 characters). of solutions i've seen far
find . -size -1k -delete i've tried using following:
find . -size -600 find . -size -600b find . -size -0.6k none of worked, can tell me how make method work smaller file sizes? (i'm sure i'm missing trailing character after 600)
c size specifier bytes, means characters. b variant may think work blocks (of 512 bytes each).
it's contained in detail in manpage find:
-size n[cwbkmg] file uses n units of space. following suffixes can used: 'b' 512-byte blocks (this default if no suffix used) 'c' bytes 'w' two-byte words 'k' kilobytes (units of 1024 bytes) 'm' megabytes (units of 1048576 bytes) 'g' gigabytes (units of 1073741824 bytes)
Comments
Post a Comment