bugfindutils - Bugs: bug #66258, No result found -size +10M -size...

 
 

bug #66258: No result found -size +10M -size -1G

Submitter:  savannah.gnu.org <yousavannah>
Submitted:  Thu 26 Sep 2024 12:11:08 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  None Fixed Release:  4.9.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 24 Oct 2024 10:50:48 AM UTC, comment #1: 

This seems to be working as designed to me.

From the man page:

> The + and - prefixes signify greater than and less than, as usual; i.e., an exact size of n units does not match. Bear in mind that the size is rounded up to the next unit. Therefore -size -1M is not equivalent to -size -1048576c. The former only matches empty files, the latter matches files from 0 to 1,048,575 bytes.


If you're searching for `-size +10M -size -1GB`, you're looking for files that are simultaneously at least 11MB and empty, so there are no files that match.

Also note that your previous search doesn't list any files between 1GB and 2GB; a file that's 1,500,000,000 bytes long wouldn't get listed.

Adam Dinwoodie <me_and>
Thu 26 Sep 2024 12:11:08 PM UTC, original submission:  

$ find "/path/tmp" -size +10M -size -2G

files which are more than 10M and less than 2GB get listed successfully

if i set to '-size -1G',

$ find "/path/tmp" -size +10M -size -1G

no result found


It produce the same results on find (GNU findutils) 4.10.0.

savannah.gnu.org <yousavannah>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by yousavannah (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.14-9aa3.
    Corresponding source code