find /etc -size -1G return only empty files

Mike McCarty Mike.McCarty at sbcglobal.net
Thu Mar 25 19:15:28 UTC 2010


Patrick O'Callaghan wrote:
> 
>      The number can be prefixed with a `+' or a `-'.  A plus sign
>      indicates that the test should succeed if the file uses at least N
>      units of storage (a common use of this test) and a minus sign
>      indicates that the test should succeed if the file uses less than
>      N units of storage.  There is no `=' prefix, because that's the
>      default anyway.
> 
> Note that this clarification is not present in the man page find(1). So
> it's either a bug in find or a bug in the documentation.

This looks perfectly straightforward to me, and it looks like
the behavior conforms to the description. Less than 1 unit is
0 units. The test is performed on "units" not on "bytes", unless
the unit happens to be the byte, which then requires "b" as the
suffix, not "G".

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!


More information about the users mailing list