4

When you create an empty folder on macOS Catalina (10.15.4) via Finder (Right Click > New Folder), and check its information (Right Click > Get Info), the "Size" attribute shows:

Zero bytes (Zero bytes on disk) for 0 items

However, if you create an empty folder via Terminal (mkdir folder), and check its information the same way, the "Size" attribute now shows:

Zero bytes (Zero bytes on disk) for 1 item

There doesn't seem to be anything hidden in the folder created from CLI.

Why is there such a difference ("0 items" vs. "1 item")?

For those who're interested, below is the ls -al output.

emreerokyar@MBP gui_vs_cli % ls -al
total 0
drwxr-xr-x@ 4 emreerokyar  staff  128 May  7 22:32 .
drwx------@ 5 emreerokyar  staff  160 May  7 22:32 ..
drwxr-xr-x@ 2 emreerokyar  staff   64 May  7 22:32 cli
drwxr-xr-x@ 2 emreerokyar  staff   64 May  7 22:32 gui
emreerokyar@MBP gui_vs_cli % cd gui
emreerokyar@MBP gui % ls -al
total 0
drwxr-xr-x@ 2 emreerokyar  staff   64 May  7 22:32 .
drwxr-xr-x@ 4 emreerokyar  staff  128 May  7 22:32 ..
emreerokyar@MBP gui % cd ..
emreerokyar@MBP gui_vs_cli % cd cli
emreerokyar@MBP cli % ls -al
total 0
drwxr-xr-x@ 2 emreerokyar  staff   64 May  7 22:32 .
drwxr-xr-x@ 4 emreerokyar  staff  128 May  7 22:32 ..
emreerokyar@MBP cli %

Below are some screen shots.

Both folders. Information pane of the "gui" folder.Information pane of the "cli" folder.

7
  • 2
    Interesting. FWIW I also get this on a Mac that still runs 10.13 (High Sierra) May 7 '20 at 20:37
  • 1
    It just looks to be something goofy with the way Finder tries to prettify stuff. For example, if you are showing the status bar in the Finder window, it shows zero items for those folders, and if you look at a folder that just contains applications, the Get Info window shows a different count. Not to mention the weirdness in the way .DS_Store files are not shown.
    – red_menace
    May 7 '20 at 20:50
  • 1
    And Quicklooks of both folders show "Zero KB, no items". Metadata (xattr, mdls) is the same for both folders except for time of creation. Very odd.
    – Gilby
    May 13 '20 at 0:31
  • 1
    Big Sur has fixed this, Get Info now consistently reports "Zero bytes (Zero bytes on disk) for 1 item" for folders created with mkdir or with the Finder. So, as others have pointed out, the answer to your question "Why is there such a difference ("0 items" vs. "1 item")?" seems to be: it was a bug (that has been fixed in Big Sur).
    – jaume
    Nov 30 '20 at 8:37
  • 1
    @jaume, I can confirm that this issue doesn't exist on macOS Big Sur (11.0.1) anymore. The outputs are consistent; both are showing "Zero bytes (Zero bytes on disk) for 1 item". Dec 1 '20 at 15:19
2

It appears that it was a bug in macOS Catalina (10.15.4), which is now fixed on macOS Big Sur (11.0.1). So the outputs are consistent now - both are showing:

Zero bytes (Zero bytes on disk) for 1 item

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .