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

Chris Adams cmadams at hiwaay.net
Thu Mar 25 16:38:00 UTC 2010


Once upon a time, Patrick O'Callaghan <pocallaghan at gmail.com> said:
> 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.

The man page has this at the top of the TESTS section:

       Numeric arguments can be specified as

       +n     for greater than n,

       -n     for less than n,

       n      for exactly n.

The bug in find appears to be specific to using "-1x" (where "x" is k,
M, or G); only files of size 0 are found.  Using "-2x" gives the
expected output.

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


More information about the users mailing list