Looking at a folder within Finder on macOS High Sierra, it is telling me that the size of the folder is 8.14GB, whereas running the command du -hsx Pictures/ it is saying that the size of the folder is 7.6GB.

Additionally, looking at the first couple of files in the folder, the size they are reporting in the Finder is different to what the output of ls -lh | head is saying.

finder and terminal with different file size output For 001.JPG, Finder is saying 1.9MB whereas ll is saying 1.8M.
For 002.JPG, Finder is saying 2MB whereas ll is saying 1.9M.
For 003.JPG, Finder is saying 2.1MB whereas ll is saying 2.0M.
For 004.JPG, Finder is saying 2MB whereas ll is saying 1.9M.
For 005.JPG, Finder is saying 2MB whereas ll is saying 1.9M.
and so on.

Why is Finder and Terminal reporting different sizes for files?


This is because finder uses MB/GB rather than MiB/GiB. For any reasonable person a MB is 1024 KB which is 1024 B however some non-technical people decided this does not fit with base 10 scientific notation and they somehow convinced the rest of the world that a MB is 1000 KB which is 1000 B.

ls reports files in KiB, MiB, GiB, etc. Although there is no need to designate them as such because those things existing is pointless.

/end rant (╯°□°)╯︵ ┻━┻

If we do some conversions though we can see that the sizes match up (or at least are close):

7.6GiB -> 8.16GB
1.8MiB -> 1.887MB
1.9MiB -> 1.992MB

Related: OS X Finder not showing correct file size - why and how “fix” it?

| improve this answer | |
  • You forgot to put that table back. – Kusalananda Dec 21 '19 at 16:13
  • 1
    @Kusalananda: Sorry, ┬─┬ノ( º _ ºノ) – jesse_b Dec 21 '19 at 16:27
  • Thanks! Should have thought about 1000 or 1024 :) – Ben Dyson Dec 21 '19 at 20:55

Finder is using SI units k=10^3

The -h option of du uses k=2^10, there is also an -si option for du.

In both systems, M=k^2, G=k^3, T=k^4

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.