Check Disk Usage By File
To check which files or directories are using up space, you can identify which users or software on your server are using up space, for example when your disk is full.
You can check the storage used per file or folder by executing the following command inside the folder of choice (for example /home
)
du -sh * | sort -h
Showing Hidden Files Only
This is useful to detect large amount of files in a .trash
directory of a cPanel server for example.
du -hs .[^.]* | sort -h