New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

Weird file sizes in Finder


Post Reply New Thread Subscribe

 
Thread Tools
slapple

 
Member Since: Jan 21, 2012
Posts: 17
slapple is on a distinguished road

slapple is offline
In Finder, I have the "Install Xcode.app" file which is 1.81 GB. I told Finder to duplicate it, and it created a "Install Xcode copy.app" file that is only 1.57 GB. Why isn't the duplicate the same size as the original?

Then I did a Get Info on the original, and it said the size is "1,814,588,172 bytes (1.81 GB on disk)". Then I did a Get Info on the duplicate, and it said the size is "1,570,347,315 bytes (1.81 GB on disk)". Why do both of them say "1.81 GB on disk" but then the number of bytes is different for each one?

I am running Lion 10.7.2.
QUOTE Thanks
toMACsh

 
toMACsh's Avatar
 
Member Since: Jul 30, 2009
Location: Wisconsin
Posts: 5,436
toMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of light
Mac Specs: Mac Mini Core 2 Duo

toMACsh is offline
More important (seeing how I don't know why) is whether the copy works just as well as the original.
QUOTE Thanks
slapple

 
Member Since: Jan 21, 2012
Posts: 17
slapple is on a distinguished road

slapple is offline
It turns out that .app files are actually directories. I'm new to Macs, so I didn't know that.

Now I just installed DeltaWalker (a program that lets you do a diff on files/folders), and it says that the "Install Xcode.app" directory is exactly the same as the "Install Xcode copy.app" directory. They both have the same files and subdirectories, and all of the content/data within all of the files are exactly the same.

So it looks like the duplication worked perfectly, but there's a bug in Finder. It is not reporting the size of the "Install Xcode copy.app" correctly. For some reason it thinks it is a different size than "Install Xcode.app", even though they are both exactly the same.
QUOTE Thanks
Lifeisabeach

 
Lifeisabeach's Avatar
 
Member Since: Sep 30, 2007
Location: Wilmington, NC
Posts: 6,841
Lifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond reputeLifeisabeach has a reputation beyond repute
Mac Specs: iMac i3 (mid-2010) + OS 10.9; TV 3; iPhone 5S; iPad 4

Lifeisabeach is offline
Interesting question. I just tried this with a different application and though it is smaller, I had the same result… a different reported size on the copy. What's even weirder… I repeated it a few times and got very different file sizes each time.


Please verify and include the exact model/year of your Mac and OS X version number (available from "About This Mac", then "More Info" on the Apple menu). Also advise us if you have any antivirus or "cleaning" software installed on your Mac. If you are using MacKeeper, you are hereby advised to uninstall it.
------
Links to commonly recommended software and instructions: Onyx | Apple Hardware Test | How to test your hard drive | How to reveal the User Library
------
Having issues with Safari? Adware is on the rise. See this guide on how to remove it: The Safe Mac » Adware Removal Guide
------
Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,649
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
So, I wanted to try this as well. I have an interesting result:

finder_sizes.jpg

That may not look interesting but Chrome Canary is listed as being 218.4MB in my /Applications folder. So, I can copy it over to my user one, have it report a different size but do so for every copy that I make. Now, it gets more interesting when I move these files over to the Trash and then back to ~/Applications. When I do that, Chrome Canary is correctly reported as 218.4MB.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Hey vansmith. What does it report as a du ?

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,649
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
Tried that earlier and noticed that it was fairly consistent with the Finder values so I didn't post it. However, I tried it again and got some interesting results:

Bundle Number Finder Value du Value
One 109.4 MB 209 MB
Two 209.8 MB 209 MB
Three 110.2 MB 209 MB

I have no idea how Finder calculates directory sizes but however it does it, it doesn't do it consistently.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
Quote:
Originally Posted by vansmith View Post
Tried that earlier and noticed that it was fairly consistent with the Finder values so I didn't post it. However, I tried it again and got some interesting results:

Bundle Number Finder Value du Value
One 109.4 MB 209 MB
Two 209.8 MB 209 MB
Three 110.2 MB 209 MB

I have no idea how Finder calculates directory sizes but however it does it, it doesn't do it consistently.
Ok, that's bizarre. I could accept that du uses base 2 calculation (it does) and finder uses base 10 (which it also does), but the discrepancy is FAR too large for that.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,649
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
This is why I didn't post the initial discrepancies (base-2/base-10 differences) but I'm bothered by these new ones. What's just as disconcerting is Finder's inconsistency. I copied the same app bundle to the same location seconds apart and it calculated three different sizes which aren't even close to each other.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
My conclusion:

Finder is borked, use du.

That's just me though

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
slapple

 
Member Since: Jan 21, 2012
Posts: 17
slapple is on a distinguished road

slapple is offline
Quote:
Originally Posted by lifeisabeach View Post
Interesting question. I just tried this with a different application and though it is smaller, I had the same result… a different reported size on the copy. What's even weirder… I repeated it a few times and got very different file sizes each time.
Yes I got that to happen too with the GarageBand.app. So far I've only seen this file size discrepancy happen with duplicated apps - every other actual file I've duplicated shows the same size as the original.

Quote:
Originally Posted by Dysfunction View Post
My conclusion:

Finder is borked, use du.
du also has problems. Here is some du output where it shows different sizes for the original and duplicate:
Code:
Slapples-MacBook-Pro:~ Administrator$ du -k /Applications/Install\ Xcode.app/
0	/Applications/Install Xcode.app//Contents/_CodeSignature
8	/Applications/Install Xcode.app//Contents/_MASReceipt
16	/Applications/Install Xcode.app//Contents/Library/LaunchServices
16	/Applications/Install Xcode.app//Contents/Library
68	/Applications/Install Xcode.app//Contents/MacOS
16	/Applications/Install Xcode.app//Contents/Resources/ASIInstallStepsView.nib
8	/Applications/Install Xcode.app//Contents/Resources/ASIServiceLevelAgreementView.nib
0	/Applications/Install Xcode.app//Contents/Resources/ASIWindow.nib
12	/Applications/Install Xcode.app//Contents/Resources/en.lproj/MainMenu.nib
32	/Applications/Install Xcode.app//Contents/Resources/en.lproj
1769088	/Applications/Install Xcode.app//Contents/Resources/Packages
0	/Applications/Install Xcode.app//Contents/Resources/Xcode.mpkg/Contents/Plugins
36	/Applications/Install Xcode.app//Contents/Resources/Xcode.mpkg/Contents/Resources/English.lproj
384	/Applications/Install Xcode.app//Contents/Resources/Xcode.mpkg/Contents/Resources
384	/Applications/Install Xcode.app//Contents/Resources/Xcode.mpkg/Contents
384	/Applications/Install Xcode.app//Contents/Resources/Xcode.mpkg
1771768	/Applications/Install Xcode.app//Contents/Resources
1771864	/Applications/Install Xcode.app//Contents
1771864	/Applications/Install Xcode.app/
Slapples-MacBook-Pro:~ Administrator$ du -k /Applications/Install\ Xcode\ copy.app/
8	/Applications/Install Xcode copy.app//Contents/_CodeSignature
8	/Applications/Install Xcode copy.app//Contents/_MASReceipt
60	/Applications/Install Xcode copy.app//Contents/Library/LaunchServices
60	/Applications/Install Xcode copy.app//Contents/Library
188	/Applications/Install Xcode copy.app//Contents/MacOS
20	/Applications/Install Xcode copy.app//Contents/Resources/ASIInstallStepsView.nib
12	/Applications/Install Xcode copy.app//Contents/Resources/ASIServiceLevelAgreementView.nib
4	/Applications/Install Xcode copy.app//Contents/Resources/ASIWindow.nib
16	/Applications/Install Xcode copy.app//Contents/Resources/en.lproj/MainMenu.nib
80	/Applications/Install Xcode copy.app//Contents/Resources/en.lproj
1769088	/Applications/Install Xcode copy.app//Contents/Resources/Packages
4	/Applications/Install Xcode copy.app//Contents/Resources/Xcode.mpkg/Contents/Plugins
120	/Applications/Install Xcode copy.app//Contents/Resources/Xcode.mpkg/Contents/Resources/English.lproj
472	/Applications/Install Xcode copy.app//Contents/Resources/Xcode.mpkg/Contents/Resources
504	/Applications/Install Xcode copy.app//Contents/Resources/Xcode.mpkg/Contents
504	/Applications/Install Xcode copy.app//Contents/Resources/Xcode.mpkg
1771948	/Applications/Install Xcode copy.app//Contents/Resources
1772228	/Applications/Install Xcode copy.app//Contents
1772228	/Applications/Install Xcode copy.app/
QUOTE Thanks
vansmith

 
vansmith's Avatar
 
Member Since: Oct 19, 2008
Location: Toronto
Posts: 17,649
vansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond reputevansmith has a reputation beyond repute
Mac Specs: 2012 13" MBP (2.5 i5, 8GB)

vansmith is offline
That seems to conflict with my findings. I saw consistent values with du (as you can see above).

I'm not saying you're wrong. Rather, it would seem that the problem is hard to reproduce with any consistency. I wonder what the problem is here.

Important Links: Community Guidelines : Use the reputation system if you've been helped.
M-F Blog :: Write for the blog
Personal Twitter
QUOTE Thanks
slapple

 
Member Since: Jan 21, 2012
Posts: 17
slapple is on a distinguished road

slapple is offline
Your du values only say 209MB. What are the actual du values down to the bytes?
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,620
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
The small difference in filesizes in du can be attributable to things like.. sparse files, directory restructuring, etc The 100+ MB differences Van had.. can't.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
slapple

 
Member Since: Jan 21, 2012
Posts: 17
slapple is on a distinguished road

slapple is offline
Quote:
Originally Posted by Dysfunction View Post
The small difference in filesizes in du can be attributable to things like.. sparse files, directory restructuring, etc
But since I duplicated it, wouldn't the duplicate have the same sparse files, directory restructuring, etc.? So the du for both the original and duplicate should be exactly the same.

But here's another example - I did a du on the GarageBand.app and the duplicate I made. The difference for those is significant - du says the duplicate is almost 2x as large as the original:

Code:
du -k /Applications/GarageBand.app/
212868	/Applications/GarageBand.app/

du -k /Applications/GarageBand\ copy.app/
397880	/Applications/GarageBand copy.app/
QUOTE Thanks

Post Reply New Thread Subscribe


« 10.4.11 upgrade problem | iCal and iCloud don't sync properly »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
How to remove file icon stuck in frame of finder window tristanjove OS X - Operating System 5 02-23-2012 02:22 PM
Make Finder Show File Path in Lion Jaygray OS X - Operating System 9 01-30-2012 05:31 AM
File sizes no longer displayed after Time Machine backup? rsherid OS X - Operating System 1 06-03-2011 03:43 AM
Finder / Places / Rogue File AlteMann OS X - Operating System 2 05-30-2011 12:45 AM
Virus?? Can't delete weird file in trash. aquariaguy Switcher Hangout 1 11-24-2008 12:11 PM

All times are GMT -4. The time now is 07:30 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?