How to Check Hard Disk Size and Hard Disk Usage on CentOS 6

Download PDF

Simple command to check the Hard Disk size and usage on CentOS 6.2. This command is a basic command for linux operating system.

To view and list of the usage of each partition in the server :

[root@centos62 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
                       13G  1.8G   10G  15% /
tmpfs                 504M     0  504M   0% /dev/shm
/dev/sda1             485M   48M  412M  11% /boot

df command will displays the total, used, and available free space on all currently mounted filesystems.

To list the size of a specific directory, run the following command :

[root@centos62 ~]# du -sh /root
2.6M    /root

du command reports disk usage. It will shows the disk space used by the files and directories in a directory. The -h option makes the output easier to read by user.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply