Hello find /etc -size -1G
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
Regards
Ala1n Sp1neu8 wrote:
Hello find /etc -size -1G
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
not sure, but: -1 strictly less than one, being an int that has got to be zero. G unit is GB.
Nicolas Thierry-Mieg wrote:
Ala1n Sp1neu8 wrote:
Hello find /etc -size -1G
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
not sure, but: -1 strictly less than one, being an int that has got to be zero. G unit is GB.
I'm sure now, a simple test confirms this. +n : >=n, so behaves as expected -n : <n, n being an int, so that's <=n-1 which can make a big difference when you have a G behind that n.
Nicolas Thierry-Mieg wrote:
Nicolas Thierry-Mieg wrote:
Ala1n Sp1neu8 wrote:
Hello find /etc -size -1G
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
not sure, but: -1 strictly less than one, being an int that has got to be zero. G unit is GB.
I'm sure now, a simple test confirms this. +n : >=n, so behaves as expected -n : <n, n being an int, so that's <=n-1 which can make a big difference when you have a G behind that n.
Interesting. The man page is somewhat ambiguous on this point, but does hint at that when it mentions that it references a number of units, the unit being changeable, and defaults to 512 bytes.
So, then,
-size -1024M
should do what he wants, up to within 1MB blocks, but still doesn't reference bytes. To do it exactly by the byte, one would need -size -1073741824b
Mike
Mike McCarty wrote:
Nicolas Thierry-Mieg wrote:
Nicolas Thierry-Mieg wrote:
Ala1n Sp1neu8 wrote:
Hello find /etc -size -1G
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
not sure, but: -1 strictly less than one, being an int that has got to be zero. G unit is GB.
I'm sure now, a simple test confirms this. +n :>=n, so behaves as expected -n :<n, n being an int, so that's<=n-1 which can make a big difference when you have a G behind that n.
Interesting. The man page is somewhat ambiguous on this point, but does hint at that when it mentions that it references a number of units, the unit being changeable, and defaults to 512 bytes.
So, then,
-size -1024M
should do what he wants, up to within 1MB blocks, but still doesn't reference bytes. To do it exactly by the byte, one would need -size -1073741824b
nitpicking, that should be -1073741825b
and should be identical to -1025M
or just use -2G: that's "up to 1GB", should be the same
On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 (aspineux@gmail.com) wrote:
Hello find /etc -size -1G
Very interesting way of finding all files with a file size of 0 ;-)
Jobst
should return all files less than 1Giga byte in /etc, but return a list of empty file (size=0)
find /etc -size -2G
work fine and return all the files
This works the same on my fedora11 and my centos 5 !
Did I miss something or is it a bug ?
Regards
-- Alain Spineux | aspineux gmail com Your email 100% available | http://www.emailgency.com ntbackup and tar frontend sending mail report | http://www.magikmon.com/mkbackup/ _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 3/25/2010 6:07 PM, Jobst Schmalenbach wrote:
On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 (aspineux@gmail.com) wrote:
Hello find /etc -size -1G
Very interesting way of finding all files with a file size of 0 ;-)
What's interesting is that the program doesn't do the unit scale multiply as the first math operation. I'd call that a bug.
Its not a bug, its a feature ... and this is not a joke.
You [de|re]fine the search with the suffices you supply making it possible to hand "find" a granularity mechanism that indeed makes find a very powerful utilitiy.
Jobst s
On Thu, Mar 25, 2010 at 06:16:40PM -0500, Les Mikesell (lesmikesell@gmail.com) wrote:
On 3/25/2010 6:07 PM, Jobst Schmalenbach wrote:
On Thu, Mar 25, 2010 at 07:45:14AM +0100, Ala1n Sp1neu8 (aspineux@gmail.com) wrote:
Hello find /etc -size -1G
Very interesting way of finding all files with a file size of 0 ;-)
What's interesting is that the program doesn't do the unit scale multiply as the first math operation. I'd call that a bug.
-- Les Mikesell lesmikesll@gmail.com
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos