Hard drives have gotten bigger over the years, but it’s still important to monitor your hard disk space usage, lest you accidentally fill up your hard drive. This is even more important on removable media, since it is much easier to fill up a four gigabyte flash drive than a one terabyte hard drive. Fortunately, there are a number of different ways to check the size of a file or a folder in Ubuntu.
To check the size of a file or folder, first launch Nautilus file browser by going to the Dash, searching for “files”, and click on the icon for Nautilus. You can also launch Nautilus by clicking on its pinned icon on the Launcher, by double-clicking the icon for any folder, or by clicking on the icon for a removable drive on the Launcher.
After Nautilus has launched, navigate to the file or folder whose size you want to check. Right-click on the file or folder, and select Properties from the context menu. A dialog box will appear showing the size of the file or folder in question. If you right-clicked and selected Properties for a folder, the dialog box will also show the entire size of every single item contained within the folder.
You can also check the size of a folder from the Terminal command-line interface. To launch the Terminal, either go to the Dash, search for “terminal”, and click on the icon for Terminal, or hit the CTRL+ALT+T keys simultaneously. Once at the Terminal, use du command with the –s and the –h switches to determine the size of a file or folder. For instance, this command will display the size of your home folder:
du –sh ~