I found out that to look for file size in bytes, I use 'c'.
So I can look for file size with 1000 bytes by using: find . -size 1000c
But what about different kind of size such as Mb, Gb or even bits?
What character or letters do I need to use?
command linefind
I found out that to look for file size in bytes, I use 'c'.
So I can look for file size with 1000 bytes by using: find . -size 1000c
But what about different kind of size such as Mb, Gb or even bits?
What character or letters do I need to use?
Best Answer
POSIX only specifies no suffix or a
c
suffix. With no suffix, values are interpreted as 512-byte blocks; with ac
suffix, values are interpreted as byte counts, as you’ve determined.Some implementations support more suffixes; for example GNU
find
supportsb
for 512-byte blocksc
for bytesw
for 2-byte wordsk
for kibibytesM
for mebibytesG
for gibibytes