Is there a way with GNU find to find files with a size >= or <= a certain size? I have only found the >, <, == operators, e.g. -size +1M, -size -1M, -size 1M, respectively.
In this blog, the author suggested a combination of multiple -size arguments as in find . -type f -size +1M -size -2M. However, this does not work for my find (GNU findutils) 4.4.2.
Since the operator
<=is logically equivalent tonot >(Not greater than), these 2 operators can be swapped with each other. In our example, to find files with size less than or equal to 1M, you can look for files not larger than 1M:-not -size +1M.The same logic can be applied to
>=usingnot <.