Options for checking free hard-drive space in OS X
Running low on disk space can greatly slow down your computer. Here are several ways to look this up on your system.
When using your Mac, maintaining a small amount of free drive space is required to keep your system running optimally. While nothing stops you from adding files to your drive until it can hold no more, once you start encroaching on the last ~10GB-20GB of space, the system will not be able to manage its virtual memory footprint as easily, resulting in slower performance. Additionally, even though OS X manages file fragmentation for conventional hard drives well by keeping 20MB chunks of data in contiguous blocks, this feature requires free space to work, and may suffer if you are limited on space.
Unfortunately it is quite easy to fill your hard drive. Even everyday tasks like importing photos and videos from cameras, or downloading movies and TV shows from iTunes can result in massive data storage. Without keeping tabs on how much space you have available for such content, you may quickly fill up your boot drive, especially if it is relatively small (such as the 64GB drives that came with MacBook Air systems).
For example, movies downloaded from iTunes may be 1GB-2GB in size, so purchasing 10 of them may use 10GB-20GB of space. Additionally, applications you install may take a number of gigabytes as well. It is also not uncommon for collections of personal photos and videos to be massive, given the ever-increasing number of megapixels being crammed into smartphone cameras these days. This is especially true if you save each and every photo and video you take.
To keep your system from running out of space, the easiest thing to do is simply monitor your hard drive; however, Apple keeps this detail relatively hidden from you with the default configuration of OS X. Even so, there are options you can use to keep an eye on the free space available in your system.
The first is to use the System Information utility, which can be accessed by choosing "About this Mac" from the Apple menu, and then clicking More Info. In the panel that appears, you can click the Storage section to see a calculation of the free space and types of files on any locally mounted volume.
While this offers a user-friendly graphic of your drive's space, keep in mind that the sizes reported are based on the system's Spotlight index. This means that if there is an indexing problem, it may show incorrect sizes in the About this Mac window.
You can always force OS X to reindex the drive to clear such problems, but this can be time-consuming. Therefore, if you need to check your drive's space used, more appropriate tools to use are Disk Utility and the Finder's Information window, both of which will show you the exact amount of storage used on your drive. Apple makes these tools convenient, but they will require you to either launch an application, or invoke the information window specifically using the contextual menu or the Command-i hot key.
If you wish to have a more readily available view of the free space on your system, then instead of using tools and information windows that require a few steps to invoke, simply enable the Finder's status bar, which will appear below each Finder window and will display not only the number of files in the current folder, but the amount of free space remaining on the drive. This feature is great for giving you an ongoing glimpse of your drive's status, and can easily be enabled by pressing Command-/ (forward slash), or by choosing the option in the View menu.
Finally, if you are a Terminal user, you have several commands at your fingertips that can give you disk usage information. The first is the classic "df" command, which will output a small table of details about your drive, including the number of blocks, those used, and those available. You can output this in a more readable format (gigabytes, megabytes, and kilobytes), by using the "-H" flag in the following way:
In addition to "df," you can use Apple's provided "diskutil" command, which is a command-line version of Apple's Disk Utility program. This command offers the ability to look up disk information, which you can do for your boot drive by running the following command:
diskutil info /
One of the lines of output from this command will be "Volume Free Space:" which will show in bytes how much space is free. To make this easier to read, you can filter the output to only show free space, by piping it through "grep" in the following way:
diskutil info / | grep "Free Space"