There may be instances that you are not able to access cPanel and/or WHM or your website may be running slow. This may be caused by the disk space usage that is already full. Follow the instructions below on how to view disk size and usage.
Useful df "disk filesystem" Commands to Check Disk Space in Linux
The ‘df‘ command stands for “disk filesystem“, it is used to get a full summary of available and used disk space usage of the file system on Linux system.
- FileSystem — provides the name of the file system.
- Size — gives us the total size of the specific file system.
- Used — shows how much disk space is used in the particular file system.
- Available — shows how much space is left in the file system.
- Use% — displays the percentage of disk space that is used.
- Mounted On — tells us the mount point of a particular file system.
By adding a certain option to the df command, you can check the disk space in Linux more precisely.These are the most popular options:
df -h — it will display the result in a human-readable format.
df -m — to display information of file system usage in MB.
df -k — to display file system usage in KB.
Useful du "disk Usage" Commands to Check usage of Space in Linux
The du command also displays the files and directory sizes in a recursively manner. The du command is quite different to the df command, in that it reports on directories and not drives. Because of this, you’ll want to know the names of directories to be checked
du -sh * : This give total space being utilized by each folder/file available.
-c option : at the end total is displayed for the disk usage
-a option : display the last modification time in the output
-a option : Gives information of all the files present under the directory
-exclude pattern option : Gives information excluding the info of .txt files only
Comments
0 comments
Please sign in to leave a comment.