Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8006561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:33:07+00:00 2026-06-04T17:33:07+00:00

The -size flag for GNU find behaves strangely. Let’s say I have the following

  • 0

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. What’s happening here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T17:33:09+00:00Added an answer on June 4, 2026 at 5:33 pm

    Looks like find is, ummm, violating the principle of least surprise? with its rounding behavior. What’s less than 1M? 0M. 😛

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When CreateFile Function is called without the flag FILE_FLAG_NO_BUFFERING, what is the size of
struct ID3v2_header{ char tag[3]; char ver[2]; char flag; int size; }; ID3v2_header readID3v2_head(string file){
The size of my JavaScript file is getting out of hand because I have
I have a middle size query with 500.000 registers from an Oracle to an
Native heap size of my application keeps increasing and finally crashes. I have a
why do i have to increase MeasureString() result width by 21% size.Width = size.Width
I have a JScrollpane which contains a scrollable client that changes its size dynamically
I have taken thumbnail image from gallery which is smaller in size and resized
Given you have an array A[1..n] of size n, it contains elements from the
I have a boolean array call it flag . I have two numeric arrays

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.