Check hard drive usage Linux

The output of the ‘df’ command will show you overall disk usage. To find out how much space a give directory is used us the ‘du -s ‘ command.

Once you are connected to the server via SSH, run the following command:
# df -h

This will output the usage of each partition in the server. To list the size of a specific directory, run the following command:
du -sh /home/

If you want to list all the subdirectory sizes under /home, run the following command:
du -sh /home/*

To find files larger than 100MB, use this command:
find / -type f -size +100000k -exec du -h {} \;


Additional resource links————


No space left on device – running out of Inodes

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *