{"id":7463,"date":"2026-04-03T10:06:24","date_gmt":"2026-04-03T08:06:24","guid":{"rendered":"https:\/\/mybox.com\/help\/?post_type=manual_kb&#038;p=7463"},"modified":"2026-04-03T10:06:25","modified_gmt":"2026-04-03T08:06:25","slug":"how-to-check-folder-size-via-ssh","status":"publish","type":"manual_kb","link":"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/","title":{"rendered":"How to check folder size via SSH"},"content":{"rendered":"\n<div class=\"translation-block translation-block-merged\">\n<p class=\"wp-block-paragraph\">If you need to identify exactly which websites or directories are consuming the most storage on your <strong>mybox<\/strong> account, the most efficient method is using the SSH (Secure Shell) terminal. While the dashboard provides a high-level overview, SSH allows you to inspect specific subfolders in real-time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use these commands, you must first have <strong>SSH access<\/strong> enabled in your <strong>mybox<\/strong> panel and a terminal client (like Terminal on macOS\/Linux or PuTTY on Windows) connected to your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom 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\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/#Using_the_du_command\" >Using the du command<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/#Breakdown_of_the_command\" >Breakdown of the command:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/#Example_Result\" >Example Result<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/#Practical_Implications\" >Practical Implications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/mybox.com\/help\/en\/knowledgebase\/how-to-check-folder-size-via-ssh\/#Summary\" >Summary<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Using_the_du_command\"><\/span>Using the <code>du<\/code> command<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<\/div>\n\n<div id=\"mybox-3830729653\" class=\"mybox-content mybox-entity-placement\"><div class=\"early-access-banner-inpost\">\r\n  <div class=\"banner-left-inpost\">\r\n    <div class=\"icon-box-inpost\">\r\n      <img decoding=\"async\" src=\"https:\/\/mybox.com\/help\/wp-content\/uploads\/2026\/02\/square-info-icon.svg\" alt=\"Info\">\r\n    <\/div>\r\n    <div class=\"text-box-inpost\">\r\n      <span class=\"label-inpost\"><span class=\"translation-block translation-block-banner-text\">Early access<\/span><\/span>\r\n      <h4><span class=\"translation-block translation-block-banner-text\">Still need help?<\/span><\/h4>\r\n      <p><span class=\"translation-block translation-block-banner-text\">Contact our customer service team.<\/span><\/p>\r\n    <\/div>\r\n  <\/div>\r\n\r\n  <div class=\"banner-right-inpost\">\r\n    <a href=\"https:\/\/panel.mybox.com\/helpdesk2\/v\/list\/\" class=\"banner-button-inpost\"><span class=\"translation-block translation-block-banner-text\">Message us<\/span><\/a>\r\n  <\/div>\r\n<\/div><\/div>\n\n<div class=\"translation-block translation-block-merged\"><p class=\"wp-block-paragraph\">The standard tool for checking disk usage is the <code>du<\/code> (disk usage) command. By default, running <code>du<\/code> alone can produce a long, confusing list of every single subfolder. To get a clean, readable summary, use the following structured command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>du -sh --max-depth=1\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Breakdown_of_the_command\"><\/span>Breakdown of the command:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>du<\/code><\/strong>: The base command for &#8220;disk usage.&#8221;<\/li>\n\n\n\n<li><strong><code>-s<\/code><\/strong>: Summarizes the total for each argument.<\/li>\n\n\n\n<li><strong><code>-h<\/code><\/strong>: &#8220;Human-readable&#8221; format (converts bytes into <strong>KB<\/strong>, <strong>MB<\/strong>, or <strong>GB<\/strong>).<\/li>\n\n\n\n<li><strong><code>--max-depth=1<\/code><\/strong>: Tells the system to only show the top-level folders in your current directory, rather than listing every file inside them.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_Result\"><\/span>Example Result<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When you run the command from your root directory, you will see an output similar to this:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>Size<\/strong><\/td><td><strong>Folder Name<\/strong><\/td><\/tr><\/thead><tbody><tr><td>48M<\/td><td><code>.\/website1.mybox.com<\/code><\/td><\/tr><tr><td>52K<\/td><td><code>.\/.logs<\/code><\/td><\/tr><tr><td>160M<\/td><td><code>.\/wordpress_site<\/code><\/td><\/tr><tr><td>156K<\/td><td><code>.\/staging_area<\/code><\/td><\/tr><tr><td><strong>210M<\/strong><\/td><td><strong>.<\/strong> (Total for current directory)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Practical_Implications\"><\/span>Practical Implications<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Hidden Folders:<\/strong> The command includes hidden directories (those starting with a dot, like <code>.logs<\/code> or <code>.cagefs<\/code>), which are often overlooked but can accumulate significant data over time.<\/li>\n\n\n\n<li><strong>Midnight Commander (MC):<\/strong> If you are using the <strong>MC<\/strong> file manager via SSH, the command output will be hidden behind the interface. Press <code>CTRL + O<\/code> to toggle the interface off and view your results, then press it again to return to the manager.<\/li>\n\n\n\n<li><strong>Real-Time Accuracy:<\/strong> Unlike dashboard statistics which may have a slight delay, the <code>du<\/code> command queries the file system directly, providing the most accurate &#8220;up-to-the-second&#8221; data.<\/li>\n\n\n\n<li><strong>Navigation:<\/strong> You can run this command inside any folder. For example, if you want to see which specific folder inside a website is the largest, use <code>cd website_folder<\/code> and then run the <code>du<\/code> command again.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>du<\/code> command is the most precise tool for managing your <strong>mybox<\/strong> storage limits. By limiting the depth of the search and using human-readable units, you can quickly locate large backups or log files that may be consuming unnecessary space.<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"template":"","format":"standard","manualknowledgebasecat":[25,54],"manual_kb_tag":[],"class_list":["post-7463","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-hosting","manualknowledgebasecat-ssh"],"_links":{"self":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7463\/revisions"}],"predecessor-version":[{"id":7464,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb\/7463\/revisions\/7464"}],"wp:attachment":[{"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/media?parent=7463"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manualknowledgebasecat?post=7463"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/mybox.com\/help\/en\/wp-json\/wp\/v2\/manual_kb_tag?post=7463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}