URL:
<http://savannah.gnu.org/bugs/?31172>
Summary: find -size -1M returns only files with zero length
Project: findutils
Submitted by: shuvalov
Submitted on: Thu 30 Sep 2010 12:43:54 PM GMT
Category: find
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.5.9
Fixed Release: None
_______________________________________________________
Details:
I've found a bug with `-size -1M` option. Actually it returns only files with
zero length. I think the reason is in pred_size code (pred.c):
f_val = ((stat_buf->st_size / pred_ptr->args.size.blocksize)
+ (stat_buf->st_size % pred_ptr->args.size.blocksize != 0));
case COMP_LT:
if (f_val < pred_ptr->args.size.size)
f_val will be equal to 1 for all files with a size in range (0, 1M) and
(f_val < pred_ptr->args.size.size) will be false for such files.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31172>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/