{"id":1850,"date":"2012-01-30T22:22:44","date_gmt":"2012-01-30T14:22:44","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1850"},"modified":"2023-04-28T09:49:57","modified_gmt":"2023-04-28T09:49:57","slug":"how-to-check-hard-disk-size-and-hard-disk-usage-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-check-hard-disk-size-and-hard-disk-usage-on-centos-6-2\/","title":{"rendered":"How to Check Hard Disk Size and Hard Disk Usage on CentOS 6.2"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p>To check the hard disk size and usage on CentOS 6.2, follow these steps:<\/p>\n<h2>Step 1: Check Hard Disk Size<\/h2>\n<p>To check the hard disk size on CentOS 6.2, use the following command:<\/p>\n<pre>\r\nfdisk -l\r\n<\/pre>\n<p>This command will display the size and partition information of all the hard disks connected to your server.<\/p>\n<h2>Step 2: Check Hard Disk Usage<\/h2>\n<p>To check the hard disk usage on CentOS 6.2, use the following command:<\/p>\n<pre>\r\ndf -h\r\n<\/pre>\n<p>This command will display the usage information of all the partitions on your server in human-readable format.<\/p>\n<pre class=\"code\">\r\n[root@centos62 ~]# df -h\r\nFilesystem            Size  Used Avail Use% Mounted on\r\n\/dev\/mapper\/vg_centos62-lv_root\r\n                       13G  1.8G   10G  15% \/\r\ntmpfs                 504M     0  504M   0% \/dev\/shm\r\n\/dev\/sda1             485M   48M  412M  11% \/boot\r\n<\/pre>\n<h2>Step 3: Check Disk Space Usage for a Specific Directory<\/h2>\n<p>To check the disk space usage for a specific directory, use the following command:<\/p>\n<pre>\r\ndu -sh \/path\/to\/directory\r\n<\/pre>\n<p>Replace &#8220;\/path\/to\/directory&#8221; with the path to the directory you want to check.<\/p>\n<p>For example:<\/p>\n<pre class=\"code\">\r\n[root@centos62 ~]# du -sh \/root\r\n2.6M    \/root\r\n<\/pre>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">fdisk<\/span> &#8211; A command-line utility that provides disk partitioning functions<\/li>\n<li><span class=\"fw-bold\">df<\/span> &#8211; A command-line utility that displays the amount of disk space available on file systems<\/li>\n<li><span class=\"fw-bold\">du<\/span> &#8211; A command-line utility that estimates file space usage<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>If you have any comments or suggestions for improvements, please feel free to share them with us.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1554,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1156],"tags":[1244,1253,1329,1351,1409,1536,1546],"class_list":["post-1850","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-hard-disk","tag-centos","tag-centos-6-2","tag-df","tag-du","tag-hard-disk","tag-linux","tag-linux-utilities"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1850"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1850\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1554"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1850"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}