Blog Post

How to view the size of EVERY file on your Mac

Stay on Top of Enterprise Technology Trends

Get updates impacting your industry from our GigaOm Research Community
Join the Community!

As mentioned by Michael Clark in his post Finder Security Bug or Feature?, the freeware application WhatSize is a quick and easy tool for measuring the size of a given folder and all subfolders and files within it. But WhatSize can only measure based on the permissions of the user who launches it, so you will not be able to measure the size of other user accounts nor folders with special permissions like the root level ‘private’ or ‘.Spotlight-V100’ or other directories inside /System. But here is a way for WhatSize to measure every file on your HD, regardless of permissions:

  1. Launch Terminal and type sudo followed by a space
  2. Right-click on the WhatSize application and choose Show Package Contents
  3. Open the Contents/MacOS folder within to find the WhatSize unix executable file
  4. Drag that file onto the Terminal window and from within that window, press return
  5. Enter your administrative password when prompted

The Terminal will fill with some code and WhatSize will now launch, seemingly normally. The difference is that it now has superuser privileges and can read every directory on your hard drive if you ask it to measure. You might be surprised at the difference between folder sizes, especially if you have multiple user accounts on your machine.

But be careful while you’re looking around in this way! Because if you choose a file and hit the Delete button, WhatSize will delete it as the root user and it won’t go in your user account’s Trash to be emptied. I recommend using the Reveal in Finder command and then sending the file to the trash from the Finder, where you’re using your regular user permissions.

Also, don’t close the Terminal window while you’re still running WhatSize, or it will quit WhatSize. Instead, use WhatSize’s File>Quit command, then close the Terminal window.

So if you really, truly want to know exactly what all your space is being used for, run WhatSize with the Terminal’s sudo command.

12 Responses to “How to view the size of EVERY file on your Mac”

  1. Omni Disksweeper is now free (it should be shareware so I can donate to it). It works great. From top down, it shows all folders and their sizes and allows me to delete what is unnecessary.
    I had to find how my system disk mysteriously filled up after it froze, then I used Diskwarrior and it went from 110gb free to just 2.9gb free. This saved the day. Thanks for your suggestions and input.

  2. Dustin

    Like MacMacken said above, WhatSize will now only measure up to 20 GB of data without a valid license purchased. Time to find a new alternative.

  3. You might want to check out OmniDiskSweeper from the OmniGroup. I actually prefer its interface. The free version doesn’t allow you to delete files directly from the app, but if you really want a delete button you can get one for $15. Or you can just delete files from the Finder if you can tolerate the inconvenience.

  4. No, you cannot do the same thing in the Finder. First, not all directories are visible in the Finder. For example, the root-level directory named “private” (which was mentioned in the post). That directory alone could be using 1.61GB of space and you wouldn’t know it by browsing around in the Finder. Also, you can’t use the Finder to browse around other user accounts. Finally, WhatSize uses a column view for easier navigation, sorts the listings by size and uses color-coding for quick visual clues as to what is big and what isn’t.

  5. Can’t you do the same thing by changing to the List view in the Finder and then pressing CMD-J and selecting “Calculate all sizes”. This will show all sizes for the folder and all files that are under that folder.

  6. great tip Eddie!

    Another great tool – a personal fav – for great understanding of where your hard drive space has gone is JDiskReport. It’s on OS X and Windows (it’s java based). It ran well enough on G4s, but SCREAMS on Intel. Great for visualizing the space and drilling down on things.