Based on gniourf_gniourf’s answer,
find "file.txt" -size -90k
will write file.txt
to stdout if and only if the size of file.txt
is less than 90K, and
find "file.txt" -size -90k -exec command \;
will execute the command command
if file.txt
has a size less than 90K.
I have tested this on Linux.
From find(1)
,
… Command-line arguments following (the
-H
,-L
and-P
options) are taken to be names of files or directories to be examined, up to the first argument that begins with ‘-’, …
(emphasis added).