

- #How to determine how much space on mac startup disk how to#
- #How to determine how much space on mac startup disk free#
You think to yourself that this is how computing should be for everyone.

Within a few seconds you see your personalized background and shortly thereafter you are opening apps, reading your email or connecting to your favorite website. So we could have gotten the results of /usr by typing: du /usrįrom anywhere else.Most days, you start up your Mac or MacBook and everything works fine. You don’t have to be physically present inside it. You can even pass a specific folder to “du” and get the sizes of files and folders inside it. So the above command becomes: du -ah | sort -rh | moreĪnd now all the files sizes are visible in descending order: To get the files as well as the folders in our net, we just need to use the “-a” parameter with du. Now that we have the sizes of folders, let’s get the file sizes as well. This shows us that there were much bigger folders further down, which are now revealed due to the descending sort. We do this by piping the output of du to the “sort” command with the “-hr” parameters like this: du -h | sort -hr | more However, if we want to find out which folders are taking up the most space, we need to sort this list in descending order. Much better! It’s much more intuitive to get the sizes in MB. If we want, we can change this to a more convenient human readable format by adding the -h parameter: du -h Note that the size is displayed in bytes. I haven’t sorted these in any particular order yet. Here you can see that in my current “usr” directory, I have large folders like “bin”, “sbin” etc.

Instead, it’ll present me with information a little bit at a time. The “more” command is so that everything doesn’t just scroll up too fast for me to see. For example, here I’m in the “usr” directory when I use the following command: du | more We use the “du” command in any given directory for a breakdown of the sizes of the individual folders. Now let’s see how we get the sizes of files an folders.
#How to determine how much space on mac startup disk free#
So that’s how you check free space on Linux. I have two volumes, but only the first one is of any significant size – 26.8 GB. In the screenshot below, I don’t have any partitions yet: In addition, you’ll sometimes see a number after these disks – these indicate partitions. The volumes on CentOS are labeled like this: /dev/vda To get the free space available on all your disks, type the following command: sudo fdisk -l
#How to determine how much space on mac startup disk how to#
Here’s a tutorial on how to give users sudo permissions. In these examples, I’m not logged into root, so I’ll sometimes be using sudo. Additionally, commands like fdisk require sudo permissions to run. Many files and folders are restricted to admins only. In this tutorial, I’ll show you how to check free space, and get the storage consumption of files and folders in MB. With the right commands, you can get a lot more information out of the command line, and that includes knowing how much free space you have. However just because this information is not instantly visible on a command line interface like CentOS, doesn’t mean it’s not easily available. You even have graphical indications of how much space you have left on your hard disk. Or you can hover over a file or folder and get its size. In a traditional GUI, you can just peek at the bottom of the window and see how much space a folder is using. The Linux command line can leave you feeling as if you don’t have all the information at your fingertips.
