> Hi Julio,
>
> Using grep is a nice hack, and unix-ey in spirit, but in this case, find
> already supports what you want directly
>
> If you're looking for files between 4000 and 6000 bytes long in directory
> <dir>, you'd use
>
> find dir -size +4000c -and -size -6000c -print
Actually, this ignores files of those exact sizes, you need to use
find dir -size +3999c -and -size -6001c -ls
To test, create two files of exact size 4000 and 6000 bytes...
perl -e "print 'y'x4000" >x4000
perl -e "print 'y'x6000" >x6000
ls -l x*
-rw------- 1 root root 4000 Nov 2 12:53 x4000
-rw------- 1 root root 6000 Nov 2 12:53 x6000
> ('c' means the size is in characters, or bytes)
> for size in kilobytes, use 'k' instaed of 'c'.
>
> you might also want to use '-ls' instead of '-print' to see the size of the
> files directly.
Thanks...Dan.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com