Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1


    Member Since
    Jan 21, 2012
    Posts
    21
    Weird file sizes in Finder
    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.

  2. #2

    toMACsh's Avatar
    Member Since
    Jul 30, 2009
    Location
    Wisconsin
    Posts
    5,995
    Specs:
    Mac Mini (Late 2014) 2.6GHz Intel Core i5 Memory: 8GB 1600MHz DDR3
    More important (seeing how I don't know why) is whether the copy works just as well as the original.

  3. #3


    Member Since
    Jan 21, 2012
    Posts
    21
    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.

  4. #4

    Lifeisabeach's Avatar
    Member Since
    Sep 30, 2007
    Location
    The Republic of Neptune
    Posts
    7,717
    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).
    ------
    Links: Onyx | EasyFind | Apple Hardware Test | How to test your hard drive | The Safe Mac » Adware Removal Guide | Uninstall MacKeeper
    ------
    Lifeisabeach - Mac-Forums Member of the Month June 2009, Feb 2012, and March 2013.

  5. #5

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,745
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  6. #6

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    Hey vansmith. What does it report as a du ?
    mike
    This machine kills fascists
    Got # ? phear the command line!

  7. #7

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,745
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  8. #8

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    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!

  9. #9

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,745
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  10. #10

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    My conclusion:

    Finder is borked, use du.

    That's just me though
    mike
    This machine kills fascists
    Got # ? phear the command line!

  11. #11


    Member Since
    Jan 21, 2012
    Posts
    21
    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/

  12. #12

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,745
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    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
    Writing a Quality Post

  13. #13


    Member Since
    Jan 21, 2012
    Posts
    21
    Your du values only say 209MB. What are the actual du values down to the bytes?

  14. #14

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,821
    Specs:
    Way... way too many specs to list.
    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!

  15. #15


    Member Since
    Jan 21, 2012
    Posts
    21
    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/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Extracting File Sizes from finder and bring them into Excel
    By rachinc in forum OS X - Operating System
    Replies: 14
    Last Post: 07-10-2013, 10:20 PM
  2. file sizes on the ipad
    By Noabb in forum iOS and Apps
    Replies: 1
    Last Post: 08-28-2011, 05:29 AM
  3. IDVD File Sizes
    By Trent Walker in forum Movies and Video
    Replies: 1
    Last Post: 03-23-2010, 10:20 AM
  4. calculating All Sizes - Finder
    By shahvikram123 in forum OS X - Operating System
    Replies: 0
    Last Post: 07-07-2008, 07:48 AM
  5. garageband file sizes.....
    By christm in forum Music, Audio, and Podcasting
    Replies: 3
    Last Post: 02-05-2007, 06:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •