[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #36539] -size flag seems to be broken
From: |
anonymous |
Subject: |
[bug #36539] -size flag seems to be broken |
Date: |
Fri, 25 May 2012 18:34:58 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 |
URL:
<http://savannah.gnu.org/bugs/?36539>
Summary: -size flag seems to be broken
Project: findutils
Submitted by: None
Submitted on: Fri 25 May 2012 06:34:57 PM UTC
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Patrick O'Neill
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.4.2
Fixed Release: None
_______________________________________________________
Details:
The -size flag for GNU find behaves strangely. Let's say I have the following
three files in a directory:
$ lh
total 8.7M
-rw------- 1 wvoq wvoq 42K 2012-05-24 18:25 small
-rw------- 1 wvoq wvoq 7.3K 2012-05-24 18:37 tiny
-rw------- 1 wvoq wvoq 8.7M 2012-05-24 18:37 big
Two of the files are less than 1MB, and the other is about 9MB. Which of the
files are less than 50K in size?
$ find -type f -size -50k
small
tiny
Which is what we expect. But which are less than 1MB in size?
$ find -type f -size -1M
$
Necessarily, any file less than 50k is also less than 1M, so why the
discrepancy? Even more disturbingly, we have:
$ find -type f -size -2M
small
tiny
which would seem to suggest that small and tiny are between 1 and 2 MB in
size, when in fact they are both <50k.
(cf.
http://stackoverflow.com/questions/10759111/is-the-gnu-find-size-flag-broken)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36539>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #36539] -size flag seems to be broken,
anonymous <=