Hello!
Cant understand find command behavior. Looks like it is rounding from 1M to 0 and is unable to see nothing below 1M. Does anybody has a better explanation? So, if I want to search with certain precision I should work with k, right? / Regards
[root@rhel92vm ~]# find /usr/share -size +10k -a -size -1M|wc -l
0
[root@rhel92vm ~]# find /usr/share -size +10k -a -size -1024k |wc -l
15171
[root@rhel92vm ~]# find /usr/share -size +10k -a -size -2M |wc -l
15171
The behavior might vary depending on the version of the bundled find package, but at least the manual in RHEL9.2 looks to have the correct explanation.
@carbajgu , so you are right. You should use the command with 'k', or even with 'c' depending on the precision you want to achieve.
Regards,
Toshi
Hi,
according to Red Hat
" -size option rounds everything to single units,files that are smaller than 1 MB are shown with command find -size 1M, as it rounds all files to 1 MB."
The behavior might vary depending on the version of the bundled find package, but at least the manual in RHEL9.2 looks to have the correct explanation.
@carbajgu , so you are right. You should use the command with 'k', or even with 'c' depending on the precision you want to achieve.
Regards,
Toshi
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.