Check Disk Space in Linux: Complete Guide
To check the server’s disk usage, you can use the following command:
- Check the disk space usage of the file system using the command df -h, displayed in a human-readable format.
- Use the command “du -h –max-depth=1” to display the size of each folder in the current directory in a human-readable format.
- Check the total size of each folder in the current directory, displayed in a human-readable format.
- List files and directories in the current directory with size displayed in a human-readable format.
These commands can assist you in understanding the server’s storage usage so that you can clean up or expand the disk space in a timely manner.