Check Disk Space in Linux: Complete Guide

To check the server’s disk usage, you can use the following command:

  1. Check the disk space usage of the file system using the command df -h, displayed in a human-readable format.
  2. Use the command “du -h –max-depth=1” to display the size of each folder in the current directory in a human-readable format.
  3. Check the total size of each folder in the current directory, displayed in a human-readable format.
  4. 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.

bannerAds