Your example is a bit odd. *All* files have a size 0 or greater.
To find files that are greater or equal than 10k you can negate it, "not smaller than 10k"
I have a purge script. Based on the Input parameter, the script has to find and delete the files greater than or equal to the nkb. For now, I am using the or condition as you mentioned above.
I have a faint memory of find 's size rounding methods being a bit strange on some systems. You might want to search these forums for the discussion of it.
Would stat give you a getter output to work with? It gives you the output in a customisable format. Using ls or the -ls flag on find can cause issues if the file has a group name with spaces, for example:-
It might not be neat, but if you use find to get a list of files based on whatever other criteria you have, you can then work through the list with some simple tests for file size, a bit like this:-
while read listed_file
do
listed_file_size="$(stat -c%s${listed_file})
if [ ${listed_file_size} -gt 10240 ]
then
echo "File ${listed_file} is greater than 10K at ${listed_file_size} bytes."
fi
done < /tmp/file_list
Of course, you could substitute an input file for the output of your find command.
If you are looking for files over a certain size, then another option might be to call stat from your find with xargs, perhaps:-
find /path/to/search -type f any other options | xargs stat -c '%s %n' | sort -n
This will give you the files in size order, so once you have the first file that exceeds your limit, you can assume that all the others will too.
What is the full criteria of your search and what actions do you want to take? It would be useful to show us the output from uname -a too.