Weird file sizes in Finder

Joined
Sep 30, 2007
Messages
9,962
Reaction score
1,235
Points
113
Location
The Republic of Neptune
Your Mac's Specs
2019 iMac 27"; 2020 M1 MacBook Air; macOS up-to-date... always.
Ok, here's an initial finding when re-downloading LibreOffice for the update:

LibreOffice in DMG: 437 MB
on hard drive: 437 MB
duplicate on hard drive: 384.4 MB.

Ok.. I just checked something else and this made my head spin. Get Info on those two copies verifies the above numbers. Specifically, 437,024,990 bytes vs 384,436,781 bytes. BUT!….

If I open the package to view contents, then Get Info on the Contents folder…. they BOTH say 437 MB, specifically 437,024,990 bytes. On BOTH copies! Like it should be all along. So why the heck is Finder reporting the duplicated .app to be smaller than its contents???? Is there some sort of compression going on when it makes a copy? I'll recheck those sizes tonight to see if it changes over time, though I'm skeptical.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Well, it would seem that this anomaly is consistent across machines (unless slapple is also pacoverflow at superuser). This person noticed a file size discrepancy that corresponds to slapple's: Xcode installer and the copy, along with GarageBand and its copy, are the same sizes as slapple's. It also seems to happen with directories and not just bundles (therefore, it's not something special about bundle directories).

I just tried it on a directory and had similar results in a directory with app bundles that had been copied:
Code:
~ :: du -sk Applications_copy/
644096	Applications_copy/
~ :: du -sk Applications
643856	Applications
I realize the difference is tiny but still apparent.

However, I did this for a directory where an app bundle hadn't been copied and the sizes were identical:
Code:
~ :: du -sk Sites/
2896248	Sites/
~ :: du -sk Sites_copy/
2896248	Sites_copy/
 
OP
S
Joined
Jan 21, 2012
Messages
24
Reaction score
0
Points
1
No, du reported that the copy was almost twice the size for the cp -rp method.

Oh, I didn't see your edit when I replied. So "du" might have worked fine in that instance. But vansmith and I have seen problems with it.

It looks to me like Finder is adding some sort of metadata inside the directory structure of apps (after all, apps are really special folders), and copy/pasting the app doesn't include that metadata.
So why the heck is Finder reporting the duplicated .app to be smaller than its contents???? Is there some sort of compression going on when it makes a copy?

I'm not sure that the duplicates are missing metadata or are being compressed. I already used DeltaWalker to compare the originals and duplicates, and they are exactly the same... unless DeltaWalker is ignoring any metadata.

But what's weird for me is that Finder reports all the duplicates to be smaller than the originals, but "du" reports all the duplicates to be larger than the originals!

(unless slapple is also pacoverflow at superuser).

Yeah, that's me.

I just tried it on a directory and had similar results in a directory with app bundles that had been copied:
Code:
~ :: du -sk Applications_copy/
644096	Applications_copy/
~ :: du -sk Applications
643856	Applications
I realize the difference is tiny but still apparent.

Doesn't matter that the difference is tiny. The point is on a copy there shouldn't be any difference at all.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Doesn't matter that the difference is tiny. The point is on a copy there shouldn't be any difference at all.
Agreed. I was simply pointing out the fact that the differences don't seem to be consistent in that one moment they're huge and the next they're tiny.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top