{"id":902,"date":"2018-04-18T10:33:17","date_gmt":"2018-04-18T05:03:17","guid":{"rendered":"https:\/\/www.coimbatorewebhosting.com\/blog\/?p=902"},"modified":"2019-08-21T11:39:47","modified_gmt":"2019-08-21T06:09:47","slug":"command-to-view-disk-size-in-ssh","status":"publish","type":"post","link":"https:\/\/coimbatorewebhosting.com\/blog\/command-to-view-disk-size-in-ssh\/","title":{"rendered":"Commands used in SSH to view disk size and usage in server"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/command-to-view-disk-size-in-ssh\/#Commands_used_in_SSH_to_view_disk_size_and_usage_in_server\" >Commands used in SSH to view disk size and usage in server:-<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/coimbatorewebhosting.com\/blog\/command-to-view-disk-size-in-ssh\/#View_disk_size_and_usage_through_SSH\" >View disk size and usage through SSH.<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Commands_used_in_SSH_to_view_disk_size_and_usage_in_server\"><\/span>Commands used in SSH to view disk size and usage in server:-<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There many reasons that you are not able to login your server WHM or cpanel to know the status of your website\u00a0when it is not loading or running slow like that.This may be caused due to the disk space usage is already full.To know the usage of disk follow the below instructions ,how to view the desk space and usage in SSH.<\/p>\n<h3 class=\"p1\"><span class=\"ez-toc-section\" id=\"View_disk_size_and_usage_through_SSH\"><\/span>View disk size and usage through SSH.<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>1.Login \/Access SSH<\/p>\n<p>2.Enter the below command that will show the results of the disk information in bytes.<\/p>\n<pre> df<\/pre>\n<p>3.And\u00a0to check the total amount of disk space for the server, used and available disk space in gigabytes, type in the following command:<\/p>\n<pre> df -h<\/pre>\n<p>4.\u00a0And to check the total amount of disk space for the server, used and available disk space in kilobytes, type in the following command:<\/p>\n<pre> df -k<\/pre>\n<p>5.\u00a0If you want to check the total amount of disk space you have for the server, used and available disk space in megabytes, type in the following command:<\/p>\n<pre> df -m<\/pre>\n<p>6.If you want to check the file system\u00a0inodes, type in the following command:<\/p>\n<pre> df -i<\/pre>\n<p>7.If you want to check the file system type of your system, use the following command:<\/p>\n<pre> df -T<\/pre>\n<p>8.\u00a0You can check disk usage by using the du command. This is most useful for a specific hosting account or a cPanel account.<\/p>\n<pre> du\u00a0 \/home\/cPanel_username\/public_html<\/pre>\n<p>9.The du -h command shows results in \u201cHuman Readable Format\u201c \u2013 sizes in Bytes, Kilobytes, Megabytes, Gigabytes etc.\u00a0This will give you more specific results with the size of the file and its directory path.<\/p>\n<pre> du\u00a0-h\u00a0\/home\/cPanel_username\/public_html<\/pre>\n<p>You may also use this for a specific folder.<\/p>\n<pre> du\u00a0-h\u00a0\/home\/cPanel_username\/public_html\/specific_folder<\/pre>\n<p>10.The command du\u00a0-sh will show the disk usage summary of the directory.<\/p>\n<pre> du\u00a0-sh \/home\/cPanel_username\/public_html<\/pre>\n<p>11.The du\u00a0\u2013max-depth=1 command<\/p>\n<p>This can also be sorted using the command below:<\/p>\n<pre> du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = \"%.0f\"} {print $1\/<strong>1024<\/strong>,\"MB\", $2}'\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Commands used in SSH to view disk size and usage in server:- There many reasons that you are not able to login your server WHM or cpanel to know the status of your website\u00a0when it is not loading or running slow like that.This may be caused due to the disk [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":941,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[59,60],"class_list":["post-902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-latest","tag-access-ssh","tag-server-whm"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/04\/how-to-check-disk-space-usage-in-linux.png","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pa2YU7-ey","_links":{"self":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=902"}],"version-history":[{"count":0,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/902\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media\/941"}],"wp:attachment":[{"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coimbatorewebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}