{"id":40458,"date":"2022-03-28T12:30:00","date_gmt":"2022-03-28T17:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=40458"},"modified":"2023-03-20T08:15:20","modified_gmt":"2023-03-20T13:15:20","slug":"how-to-use-the-du-command-in-linux","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/","title":{"rendered":"How to Use the Du Command in Linux"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\r\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" class=\"wp-image-40517\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg\" alt=\"how to use the du command in Linux\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">In this tutorial, we are going to explain the &#8220;du&#8221; command used on every <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">Linux<\/a> distribution such as Ubuntu, Debian, or CentOS.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">&#8220;Du&#8221; stands for Disk Usage and every Linux user should use it very often to check the amount of disk space used by directory or file. Using the &#8220;du&#8221; command is very simple by typing it on the console and adding additional phrases called options. In other words, the &#8220;du&#8221; command is different every time, according to the needs of the user and what the user wants to be displayed as output.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">In this blog post, the &#8220;du&#8221; command will be explained with real examples. Let&#8217;s get started!<\/p><div class=\"rhbl-mattermost-banner rhbl-entity-placement\" id=\"rhbl-3832956426\"><div id=\"rhbl-2478888494\" style=\"margin-top: 20px;margin-bottom: 20px;margin-left: auto;margin-right: auto;text-align: center;\"><a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/?mtm_campaign=ad-mm&#038;mtm_source=blog&#038;mtm_content=mm\" target=\"_blank\" aria-label=\"slack-privacy-try-mattermost-4\"><img src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2024\/06\/slack-privacy-try-mattermost-4.webp\" alt=\"\"  srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2024\/06\/slack-privacy-try-mattermost-4.webp 728w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2024\/06\/slack-privacy-try-mattermost-4-300x37.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2024\/06\/slack-privacy-try-mattermost-4-150x19.webp 150w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><\/div>\r\n\r\n\r\n\r\n<p><!--more--><\/p>\r\n\r\n\r\n\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a7770e86fa9b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><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><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a7770e86fa9b\"  aria-label=\"Toggle\" \/><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:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#Du-Command-Syntax\" >Du Command Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#Executing-the-Du-Command\" >Executing the Du Command<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#Display-Directory-Size\" >Display Directory Size<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#More-About-Du-Command\" >More About Du Command<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Fresh install of Ubuntu, CentoOS, Debian or AlmaLinux<\/li>\r\n<li>User privileges: root or non-root user with sudo privileges<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-du-command-syntax\"><span class=\"ez-toc-section\" id=\"Du-Command-Syntax\"><\/span>Du Command Syntax<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">This is the general syntax of the du command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">du [Options] [Directory Name or File Name]<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">The first word of the syntax will always be &#8220;du&#8221;, the second word will be for arguments like -h (human-readable output), -l (count links), -b (bytes) and etc. The third word is for specifying the name of the directory or file that the user wants to get information for. The second and the third words do not need to be specified, but the output of the &#8220;du&#8221; command will not be readable or understandable at all.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-executing-the-du-command\"><span class=\"ez-toc-section\" id=\"Executing-the-Du-Command\"><\/span>Executing the Du Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Execute the &#8220;du&#8221; command without any arguments for example in the <b>\/root<\/b> directory on your server.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">du<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">You should get the following output.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@vps:~# du\r\n4       .\/.config\/procps\r\n4       .\/.config\/mc\/mcedit\r\n12      .\/.config\/mc\r\n20      .\/.config\r\n8       .\/.nano\r\n4       .\/.gnupg\/private-keys-v1.d\r\n8       .\/.gnupg\r\n4       .\/.local\/share\/mc\/mcedit\r\n16      .\/.local\/share\/mc\r\n20      .\/.local\/share\r\n24      .\/.local\r\n8       .\/.ssh\r\n4       .\/.cache\/mc\/mcedit\r\n12      .\/.cache\/mc\r\n16      .\/.cache\r\n120     .<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">As you can see the output is not very understandable, and there is no information about the given numbers if they are in Kilobytes, Megabytes, or Gigabytes<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Execute the <b>du<\/b> command along with the &#8220;<b>-h<\/b>&#8221; argument.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">du -h<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Now, the output will be different:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@host:~# du -h\r\n4.0K    .\/.config\/procps\r\n4.0K    .\/.config\/mc\/mcedit\r\n12K     .\/.config\/mc\r\n20K     .\/.config\r\n8.0K    .\/.nano\r\n4.0K    .\/.gnupg\/private-keys-v1.d\r\n8.0K    .\/.gnupg\r\n4.0K    .\/.local\/share\/mc\/mcedit\r\n16K     .\/.local\/share\/mc\r\n20K     .\/.local\/share\r\n24K     .\/.local\r\n8.0K    .\/.ssh\r\n4.0K    .\/.cache\/mc\/mcedit\r\n12K     .\/.cache\/mc\r\n16K     .\/.cache\r\n120K    .\r\n<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">As you can see now, the directories and files are displayed with their sizes in Kilobytes (In this example there were no files or folders in Megabytes).<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-display-directory-size\"><span class=\"ez-toc-section\" id=\"Display-Directory-Size\"><\/span>Display Directory Size<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">In this example, we are going to use the default WordPress installation directory. Before you check the size we assume that you have downloaded it from their official website.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">wget https:\/\/wordpress.org\/latest.zip\r\nunzip latest.zip<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To check the size of the WordPress directory, execute the command below:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">du -csxh \/wordpress<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">You should get the following output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@vps:~# du -csxh wordpress\/\r\n64M     wordpress\/\r\n64M     total\r\n<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">This command is very useful, the meaning of the arguments are described below:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">-c, --total\r\n              produce a grand total\r\n     -s, --summarize\r\n              display only a total for each argument\r\n     -x, --one-file-system\r\n              skip directories on different file systems\r\n     -h, --human-readable\r\n              print sizes in human readable format (e.g., 1K 234M 2G)<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">You can also use the additional &#8220;<b>-k<\/b>&#8221; or &#8220;<b>-m<\/b>&#8221; flags to display the directory in Kilobytes or Megabytes.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@vps:~# du -csxh -k wordpress\/\r\n65296   wordpress\/\r\n65296   total\r\nroot@host:~# du -csxh -m wordpress\/\r\n64      wordpress\/\r\n64      total\r\n<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To check the sizes of all directories and files inside the WordPress directory execute the command below:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">cd \/wordpress\r\n\r\ndu -bsh *<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">You should receive the following output:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@vps:~\/wordpress# du -bsh *\r\n405     index.php\r\n20K     license.txt\r\n7.3K    readme.html\r\n7.0K    wp-activate.php\r\n8.4M    wp-admin\r\n351     wp-blog-header.php\r\n2.3K    wp-comments-post.php\r\n3.0K    wp-config-sample.php\r\n9.7M    wp-content\r\n3.9K    wp-cron.php\r\n40M     wp-includes\r\n2.5K    wp-links-opml.php\r\n3.9K    wp-load.php\r\n47K     wp-login.php\r\n8.4K    wp-mail.php\r\n23K     wp-settings.php\r\n32K     wp-signup.php\r\n4.7K    wp-trackback.php\r\n3.2K    xmlrpc.php\r\n<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">This is the explanation of the command above:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">-b, --bytes\r\n              equivalent to '--apparent-size --block-size=1'\r\n     -s, --summarize\r\n              display only a total for each argument\r\n     -h, --human-readable\r\n              print sizes in human readable format (e.g., 1K 234M 2G)<\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\" id=\"h-more-about-du-command\"><span class=\"ez-toc-section\" id=\"More-About-Du-Command\"><\/span>More About Du Command<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">The previous paragraphs were explained with examples of the most used &#8220;du&#8221; commands in one regular day of one Linux System Administrator. If you want to learn more about the &#8220;du&#8221; command you can always use the user manual of the &#8220;du&#8221; command.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">man du<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">The list of the options will be long since the &#8220;du&#8221; command has plenty of arguments for use.<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-preformatted\">root@host:~# man du\r\nDU(1)                                                                      User Commands                                                                      DU(1)\r\n\r\nNAME\r\n       du - estimate file space usage\r\n\r\nSYNOPSIS\r\n       du [OPTION]... [FILE]...\r\n       du [OPTION]... --files0-from=F\r\n\r\nDESCRIPTION\r\n       Summarize disk usage of the set of FILEs, recursively for directories.\r\n\r\n       Mandatory arguments to long options are mandatory for short options too.\r\n\r\n       -0, --null\r\n              end each output line with NUL, not newline\r\n\r\n       -a, --all\r\n              write counts for all files, not just directories\r\n\r\n       --apparent-size\r\n              print  apparent  sizes, rather than disk usage; although the apparent size is usually smaller, it may be larger due to holes in ('sparse') files, in\u2010\r\n              ternal fragmentation, indirect blocks, and the like\r\n                          .\r\n                          .\r\n                          .\r\n                          .\r\n   Manual page du(1) line 3 (press h for help or q to quit)\r\n<\/pre>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">That&#8217;s it! You learned how to use the Du Command in Linux-based distributions such as Ubuntu, CentOS, Debian and etc.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Of course, you don\u2019t have to know everything about the Du Command and its usage. If you use one of our NVMe <a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\">VPS Hosting<\/a> plans, in which case you can simply ask our expert Linux admins to display some information about some directory on your server for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">If you liked this post on how to use the Du Command in Linux, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we are going to explain the &#8220;du&#8221; command used on every Linux distribution such as Ubuntu, Debian, &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Use the Du Command in Linux\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#more-40458\" aria-label=\"Read more about How to Use the Du Command in Linux\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":40517,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[1992,172,27],"class_list":["post-40458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-du-command","tag-install","tag-linux","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.9 (Yoast SEO v28.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use the Du Command in Linux | RoseHosting<\/title>\n<meta name=\"description\" content=\"In this tutorial, we are going to explain the &quot;du&quot; command used on every Linux distribution such as Ubuntu, Debian, or CentOS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the Du Command in Linux\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we are going to explain the &quot;du&quot; command used on every Linux distribution such as Ubuntu, Debian, or CentOS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-28T17:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-20T13:15:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"In this tutorial, we are going to explain the &quot;du&quot; command used on every Linux distribution such as Ubuntu, Debian, or CentOS.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Use the Du Command in Linux\",\"datePublished\":\"2022-03-28T17:30:00+00:00\",\"dateModified\":\"2023-03-20T13:15:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/\"},\"wordCount\":615,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-use-the-du-command-in-Linux.jpg\",\"keywords\":[\"du command\",\"install\",\"Linux\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/\",\"name\":\"How to Use the Du Command in Linux | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-use-the-du-command-in-Linux.jpg\",\"datePublished\":\"2022-03-28T17:30:00+00:00\",\"dateModified\":\"2023-03-20T13:15:20+00:00\",\"description\":\"In this tutorial, we are going to explain the \\\"du\\\" command used on every Linux distribution such as Ubuntu, Debian, or CentOS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-use-the-du-command-in-Linux.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/how-to-use-the-du-command-in-Linux.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to use the du command in Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-use-the-du-command-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the Du Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use the Du Command in Linux | RoseHosting","description":"In this tutorial, we are going to explain the \"du\" command used on every Linux distribution such as Ubuntu, Debian, or CentOS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the Du Command in Linux","og_description":"In this tutorial, we are going to explain the \"du\" command used on every Linux distribution such as Ubuntu, Debian, or CentOS.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-03-28T17:30:00+00:00","article_modified_time":"2023-03-20T13:15:20+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_description":"In this tutorial, we are going to explain the \"du\" command used on every Linux distribution such as Ubuntu, Debian, or CentOS.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Use the Du Command in Linux","datePublished":"2022-03-28T17:30:00+00:00","dateModified":"2023-03-20T13:15:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/"},"wordCount":615,"commentCount":1,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg","keywords":["du command","install","Linux"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/","name":"How to Use the Du Command in Linux | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg","datePublished":"2022-03-28T17:30:00+00:00","dateModified":"2023-03-20T13:15:20+00:00","description":"In this tutorial, we are going to explain the \"du\" command used on every Linux distribution such as Ubuntu, Debian, or CentOS.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/02\/how-to-use-the-du-command-in-Linux.jpg","width":742,"height":372,"caption":"how to use the du command in Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-use-the-du-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use the Du Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=40458"}],"version-history":[{"count":7,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40458\/revisions"}],"predecessor-version":[{"id":45187,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/40458\/revisions\/45187"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/40517"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=40458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=40458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=40458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}