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

CentOS 6.2 is a Linux distribution that is widely used in web hosting and server environments. If you are a system administrator or a web hosting specialist, it is essential to monitor the hard disk size and usage of your server regularly. In this guide, I will show you how to check the hard disk size and hard disk usage on CentOS 6.2.

As a system administrator or a web hosting specialist, it is crucial to monitor the hard disk size and usage of your server. If the hard disk size is running out or the usage is too high, it can cause various issues, including slow performance, downtime, or data loss.

See also  How to Install Varnish Cache With Apache On CentOS 6.5

To check the hard disk size and usage on CentOS 6.2, follow these steps:

Step 1: Check Hard Disk Size

To check the hard disk size on CentOS 6.2, use the following command:

fdisk -l

This command will display the size and partition information of all the hard disks connected to your server.

Step 2: Check Hard Disk Usage

To check the hard disk usage on CentOS 6.2, use the following command:

df -h

This command will display the usage information of all the partitions on your server in human-readable format.

[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

Step 3: Check Disk Space Usage for a Specific Directory

To check the disk space usage for a specific directory, use the following command:

du -sh /path/to/directory

Replace “/path/to/directory” with the path to the directory you want to check.

See also  How to Configure LDAP Authentication for Subversion on CentOS 5.5

For example:

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

Commands Mentioned:

  • fdisk – A command-line utility that provides disk partitioning functions
  • df – A command-line utility that displays the amount of disk space available on file systems
  • du – A command-line utility that estimates file space usage

Conclusion

By following the above steps, you can easily check the hard disk size and usage on your CentOS 6.2 server. This information is crucial for monitoring the health of your server and taking necessary actions to prevent any issues that may arise from running out of hard disk space.

See also  How to Fix "-bash: scp: command not found" Error

By following these steps, you can easily monitor the health of your server and prevent any issues that may arise from running out of hard disk space.

If you have any comments or suggestions for improvements, please feel free to share them with us.

Comments

Leave a Reply

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