1. File sizes through terminal vs Nautilus. 2. Nautilus size display

Sorry, two questions. Kind of related.

  1. Using find . -maxdepth 1 -type f -exec du -h {} + | sort --human-numeric-sort --reverse from https://askubuntu.com/questions/743946/showing-file-sizes-in-sorted-order I get some file sizes that do not match up to what Nautilus shows. This does not seem like a rounding issue either when I compare files of various sizes. Am I right/wrong in that understanding? If right, then any thoughts on the mismatch?
  2. I found https://askubuntu.com/questions/7882/can-the-nautilus-properties-page-show-size-in-bytes-for-multiple-selects-and-fo and was wondering how I can change the %i Bytes argument to get MB instead of B. Any suggestions?

@carmar I cannot answer your question but I am convinced I have seen size differences between Nautilus, Disk Analyser and Disks. In my case whilst checking free space/occupied space in root.

1 Like

@carmar. I would hardly call my observation a solution :face_with_raised_eyebrow:
Maybe someone else may know the answer why Nautilus differs when reporting disk/folder size info?

You did answer #1. There is a mismatch. I don’t expect the origin of every problem to be determined. Any additional information on it helps.

As for #2, I decided to try it myself and see if I could figure it out. As I walked through the steps on that thread I found that my sources.list didn’t have any urls for the nautilus source. I got lazy and gave up :wink:

Regarding question #1, the mismatch is because they are using different units of measurement.
More info can be found at the following link:

1 Like

Thanks. I’ve always thought in terms of base 2 but was vaguely aware of the usage of base 10 for disks, etc.
This answers #1.

When I eventually stop being lazy and work on #2, I’ll update this thread with what I learned from that.

Use the -size=MB option to view the file size in megabytes in the terminal.