In the process of using a dedicated or virtual server, there arises a need to monitor the amount of disk space used. To perform the check, it is sufficient to use a few methods. As an example, let's consider how to view disk statistics using the WEB-VNC or SSH protocols.
The df Command
To find out the amount of free and used disk space, it is enough to use the combination “df -h”.

Information about used and free space is sometimes provided by “df -i”.

The ncdu Utility
This utility is not included in the base software, so the user needs to install it. With this utility, you can easily and quickly find out about the occupied disk space. To display information from the root folder, just add the symbol “/” at the end of the command. Otherwise, the utility provides information about the folder in which the user is located at that moment. Navigation between folders is done using the Enter key and arrow keys.

Other Commands
To obtain information about disk space, the following commands are used:
- du -h -d1 2>/dev/null | sort -h. Outputs a list of folders that take up the most space;
- ls -alhSr. Lists files and folders sorted by size;
- find /path/to/dir | wc -. Counts the inodes used by the directory.
The last command uses /path/to/dir — the path to the directory.
The mc Utility
Midnight Commander (abbreviated as mc) is a console file manager. This utility allows the user to see the server's file system and perform actions with it, including copying, moving, and deleting. With Midnight Commander, the user navigates between directories.
