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

In this post, i will share the 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
    /dev/mapper/vg_centos62-lv_root
                           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.

READ  How to Properly Shutdown and Reboot Linux CentOS 5/CentOS 6/RHEL 5/RHEL 6

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.

Leave a Reply

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

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee