{"id":3639,"date":"2023-01-12T11:34:11","date_gmt":"2023-01-12T11:34:11","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=3639"},"modified":"2024-01-14T09:30:17","modified_gmt":"2024-01-14T09:30:17","slug":"du-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/du-command-in-linux\/","title":{"rendered":"The \u201cdu\u201d Command in Linux [14 Practical Examples]"},"content":{"rendered":"<p style=\"text-align: justify;\">The <strong>du <\/strong>command in <strong>Linux <\/strong>is used to view <strong>disk space<\/strong> consumed by <strong>files <\/strong>and <strong>directories<\/strong>. It can be handy to keep track of how much space is used by whom, especially for systems with low <strong>storage<\/strong>. Moreover, it has a lot of <strong>options <\/strong>so that anyone can customize it according to his needs. In this article, I will show you how to use the <strong>du <\/strong>command in <strong>Linux <\/strong>with a lot of practical examples.<\/p>\n<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 eztoc-toggle-hide-by-default' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#A_Description\" >A. Description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#B_Syntax\" >B. Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#C_Options\" >C. Options<\/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:\/\/linuxsimply.com\/du-command-in-linux\/#Practical_Examples_of_the_%E2%80%9Cdu%E2%80%9D_Command_in_Linux\" >Practical Examples of the \u201cdu\u201d Command in Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_1_Disk_Usage_of_a_Single_File\" >Example 1: Disk Usage of a Single File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_2_Disk_Usage_for_a_Single_Directory_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 2: Disk Usage for a Single Directory Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_3_Disk_Usage_of_a_Directory_Without_Subdirectories\" >Example 3: Disk Usage of a Directory Without Subdirectories<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_4_Disk_Usage_in_Human_Readable_Format_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 4: Disk Usage in Human Readable Format Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_5_Disk_Usage_of_Each_File_a_Directory\" >Example 5: Disk Usage of Each File a Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_6_Summary_of_Disk_Usage_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 6: Summary of Disk Usage Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_7_Total_Disk_Usage_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 7: Total Disk Usage Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_8_Disk_Usage_to_a_Particular_Level\" >Example 8: Disk Usage to a Particular Level<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_9_Last_Modification_Time_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 9: Last Modification Time Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_10_Last_Access_Time\" >Example 10: Last Access Time<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_11_Apparent_Size_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 11: Apparent Size Using the \u201cdu\u201d command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_12_Disk_Usage_in_Specific_Block_Size\" >Example 12: Disk Usage in Specific Block Size<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_13_Disk_Usage_in_Human-Readable_Format_with_Power_of_1000\" >Example 13: Disk Usage in Human-Readable Format with Power of 1000<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Example_14_Disk_Usage_in_the_scale_of_1MB_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\" >Example 14: Disk Usage in the scale of 1MB Using the \u201cdu\u201d command in Linux<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"A_Description\"><\/span>A. Description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The \u201c<strong>du<\/strong>\u201d in the <strong>du <\/strong>command in <strong>Linux <\/strong>stands for \u201c<strong>Disk Usage<\/strong>\u201d which is literary what the command does, shows disk usage. It is a standard program in <strong>Unix<\/strong>\/<strong>Unix-like <\/strong>operating systems. Currently, it is part of <strong>GNU Coreutils<\/strong>. By default, the <strong>du <\/strong>command shows space in the unit of <strong>1KB. <\/strong>However, the availability of different <strong>options <\/strong>makes it highly useful.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"B_Syntax\"><\/span>B. Syntax<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>du <\/strong>command in <strong>Linux <\/strong>is simple to use. It can take multiple options and arguments at the same time.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">du [OPTION]... [FILE]...<\/code><\/pre>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<strong>Note: <\/strong>In the above syntax <strong>OPTION <\/strong>and <strong>FILE <\/strong>\u00a0enclosed by square brackets and followed by <strong>3 dots<\/strong> represent that multiple <strong>options <\/strong>and <strong>arguments <\/strong>can be utilized at the same time.<\/p>\n<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"C_Options\"><\/span>C. Options<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>du <\/strong>command in <strong>Linux <\/strong>has a lot of <strong>options<\/strong>. You can use those <strong>options <\/strong>to customize your output. You can check them yourself by typing the command below in the <strong>Ubuntu terminal<\/strong>, it will take you to the <strong>manual <\/strong>page of the <strong>du <\/strong>command in <strong>Linux<\/strong>.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">man du<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>Useful Options<\/strong><\/span><\/p>\n<div class=\"su-list\" style=\"margin-left:20px\">\n<ul>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-a, &#8211;all <\/strong>( shows all files including directories)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;apparent-size <\/strong>( displays <strong>apparent sizes<\/strong> rather than <strong>disk usage<\/strong>)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-B, &#8211;block-size <\/strong>( is used to define a new scale)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-c, &#8211;total <\/strong>(shows <strong>grand total <\/strong>at the end)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-h, &#8211;human-readable <\/strong>( prints <strong>disk usage <\/strong>in <strong>human-readable<\/strong> format)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-S, &#8211;separate-dirs <\/strong>( doesn\u2019t show <strong>subdirectories<\/strong>)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;si <\/strong>( uses <strong>1000 <\/strong>as the scale)<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-s, &#8211;summarize <\/strong>( shows only <strong>total disk usage)<\/strong><\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;time <\/strong>( is used to show last <strong>modification<\/strong> time, <strong>access<\/strong> time etc.)<\/li>\n<\/ul>\n<p><strong><\/div><\/strong><\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<strong>Note:<\/strong> The <strong>options<\/strong> in <strong>Linux<\/strong> <a href=\"https:\/\/linuxsimply.com\/cli-in-linux\/\" target=\"_blank\" rel=\"noopener\">CLI<\/a> (<strong>Command Line Interface<\/strong>) are all <strong>case-sensitive<\/strong>, So be careful while using them.<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Practical_Examples_of_the_%E2%80%9Cdu%E2%80%9D_Command_in_Linux\"><\/span>Practical Examples of the \u201cdu\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In this section, I will show you some practical examples of the <strong>du <\/strong>command in <strong>Linux<\/strong>. I used the <strong>directory tree<\/strong> below.<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-3685\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16.png\" alt=\"\" width=\"528\" height=\"493\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16.png 528w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-300x280.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-1024x956.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-768x717.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-1536x1434.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-2048x1912.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-161x150.png 161w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-100x93.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-375x350.png 375w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-16-788x735.png 788w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/p>\n<p style=\"text-align: justify;\">To download all those materials, click on the button below.<\/p>\n<div class=\"su-button-center\"><a href=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-Linux.zip\" class=\"su-button su-button-style-default\" style=\"color:#000000;background-color:#E8F9FF;border-color:#bac8cc;border-radius:56px\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"color:#000000;padding:8px 26px;font-size:20px;line-height:30px;border-color:#effbff;border-radius:56px;text-shadow:0px 0px 0px #000000\"><i class=\"sui sui-download\" style=\"font-size:20px;color:#1AA1D6\"><\/i> Download this file to work with the \u201cdu\u201d command in Linux<\/span><\/a><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_Disk_Usage_of_a_Single_File\"><\/span>Example 1: Disk Usage of a Single File<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">For the starter, I will show you how to view the amount of disk space used by a <strong>single file<\/strong> using the <strong>du <\/strong>command in <strong>Linux<\/strong>. I will use the <strong>hello <\/strong>file here. Now follow the steps below:<\/p>\n<ol>\n<li>At first open a <strong>Ubuntu Terminal<\/strong><\/li>\n<li>Type the following command below in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du hello<\/code><\/pre>\n<\/li>\n<li>Now, press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">You will see an output like the one below. The number on the left is the size of the file. As I have mentioned earlier, The <strong>du <\/strong>command in<strong> Linux <\/strong>shows the size in the scale of <strong>1KB <\/strong>by default. So, the file <strong>hello <\/strong>is <strong>4KB <\/strong>in size.<img decoding=\"async\" class=\"aligncenter wp-image-3646 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1.png\" alt=\"showing space usage of a single file using the du command in Linux\" width=\"402\" height=\"60\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1.png 402w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-300x45.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-1024x153.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-764x114.png 764w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-1536x229.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-2048x306.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-1005x150.png 1005w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-100x15.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-1-788x117.png 788w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_2_Disk_Usage_for_a_Single_Directory_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 2: Disk Usage for a Single Directory Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now, you will see the space usage by a <strong>directory<\/strong>. I will use the <strong>walid <\/strong>directory for this purpose. You can also do that with me by following the steps below:<\/p>\n<ol>\n<li>At first launch, an <strong>Ubuntu terminal<\/strong><\/li>\n<li>Now type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du walid<\/code><\/pre>\n<\/li>\n<li>Then press the <strong>ENTER <\/strong>button on the keyboard<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">As you can see, the <strong>du <\/strong>command has listed out space usage of the <strong>walid <\/strong>directory and its <strong>subdirectory <\/strong>as well.<img decoding=\"async\" class=\"aligncenter wp-image-3647 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2.png\" alt=\"Showing disk usage of a directory\" width=\"382\" height=\"135\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2.png 382w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-300x106.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-1024x362.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-767x271.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-1536x543.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-2048x724.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-424x150.png 424w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-100x35.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-990x350.png 990w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-2-788x278.png 788w\" sizes=\"(max-width: 382px) 100vw, 382px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_3_Disk_Usage_of_a_Directory_Without_Subdirectories\"><\/span>Example 3: Disk Usage of a Directory Without Subdirectories<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">From <strong>example 2<\/strong>, you can see the <strong>du <\/strong>command in <strong>Linux <\/strong>lists the disk usage of <strong>subdirectories <\/strong>as well. But what if you want to know <strong>space usage<\/strong> excluding <strong>subdirectories<\/strong>? You can do that by doing the following. I will use the <strong>walid <\/strong>directory in this example too.<\/p>\n<ol>\n<li>At the beginning, press <strong>CTRL + ALT + T<\/strong> to open an <strong>Ubuntu Terminal<\/strong><\/li>\n<li>Now input the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -S walid<\/code><\/pre>\n<\/li>\n<li>Then Press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">If you remember, in the previous example, the size of the <strong>walid <\/strong>directory was <strong>20<\/strong>, but now it is <strong>4<\/strong>. why? Because you are seeing the size without the size of the subdirectory <strong>myfolder<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3659 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14.png\" alt=\"Displaying disk usage of directory and subdirectory separately using the du command in Linux\" width=\"428\" height=\"112\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14.png 428w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-300x79.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-1024x268.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-764x200.png 764w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-1536x402.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-2048x536.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-573x150.png 573w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-100x26.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-1338x350.png 1338w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-14-788x206.png 788w\" sizes=\"(max-width: 428px) 100vw, 428px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_4_Disk_Usage_in_Human_Readable_Format_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 4: Disk Usage in Human Readable Format Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">As humans, we are used to certain types of data units (like <strong>Kilo, Mega, Giga<\/strong>). Here, you can present your size unit in a <strong>human-readable<\/strong> format by using the <strong>du <\/strong>command in <strong>Linux<\/strong>. I will use the <strong>walid <\/strong>directory as well. Follow the steps below with me.<\/p>\n<ol>\n<li>At first, launch an<strong> Ubuntu Terminal<\/strong><\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -h walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button on the keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Here, you can see the numbers <strong>12K<\/strong>, and <strong>16K <\/strong>which are pretty easy to understand and soothing for the eyes.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3648 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3.png\" alt=\"Disk usage in human-readable format\" width=\"434\" height=\"126\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3.png 434w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-300x87.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-1024x297.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-765x222.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-1536x446.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-2048x595.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-517x150.png 517w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-100x29.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-1206x350.png 1206w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-3-788x228.png 788w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_5_Disk_Usage_of_Each_File_a_Directory\"><\/span>Example 5: Disk Usage of Each File a Directory<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In the <strong>du <\/strong>command in <strong>Linux<\/strong>, it is also possible to list each and every file and folder in a directory. I used the <strong>option <\/strong>\u201c<strong>-a\u201d <\/strong>here, for that purpose. Also, I used the option \u201c<strong>-h<\/strong>\u201d to show you that you can combine multiple <strong>options<\/strong>. I used the <strong>walid <\/strong>directory as usual. Now follow these steps below:<\/p>\n<ol>\n<li>First of all, press <strong>CTRL + ALT + T<\/strong> to launch the <strong>Ubuntu terminal<\/strong>.<\/li>\n<li>Then type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -a -h walid<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>OR,<\/strong><\/span><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">du -ah walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>key.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">You can clearly see all the files and subdirectories are shown here with their specific <strong>disk space size<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3649 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4.png\" alt=\"Disk usage of each file using the du command in Linux\" width=\"477\" height=\"134\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4.png 477w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-300x84.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-1024x288.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-765x215.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-1536x431.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-2048x575.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-534x150.png 534w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-100x28.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-1246x350.png 1246w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-4-788x221.png 788w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_6_Summary_of_Disk_Usage_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 6: Summary of Disk Usage Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">You may not always desire to see the sizes of all <strong>directories<\/strong> and <strong>subdirectories<\/strong>, but rather the size of a <strong>particular<\/strong> directory. You will need to use the <strong>option \u201c-s\u201d <\/strong>for that purpose. I used the <strong>walid <\/strong>directory for the sake of this example. You can follow the steps with me below:<\/p>\n<ol>\n<li>Launch a <strong>Ubuntu terminal <\/strong>first.<\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -s -h walid<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>OR,<\/strong><\/span><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">du -sh walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button from your keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Now the summary of disk usage of the <strong>walid <\/strong>directory is visible in the terminal. This example is useful for a directory with a lot of subdirectories and files.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3650 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5.png\" alt=\"Summary of disk usage\" width=\"498\" height=\"87\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5.png 498w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-300x52.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-1024x179.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-767x134.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-1536x268.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-2048x358.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-859x150.png 859w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-100x17.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-2003x350.png 2003w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-5-788x137.png 788w\" sizes=\"(max-width: 498px) 100vw, 498px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_7_Total_Disk_Usage_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 7: Total Disk Usage Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>du <\/strong>command in <strong>Linux <\/strong>provides an <strong>option <\/strong>to print <strong>grand total <\/strong>at the end of a list. You need to use the <strong>option \u201c-c\u201d <\/strong>which is quite hard to remember. I used the <strong>walid <\/strong>directory as the previous one. Now do the following:<\/p>\n<ol>\n<li>At the beginning, open a <strong>terminal <\/strong>in <strong>Ubuntu<\/strong><\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -c walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">As you can see, there is an extra line at the end of the list with the title <strong>total<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3651 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6.png\" alt=\"Grand total disk usage using the du command in Linux\" width=\"457\" height=\"141\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6.png 457w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-300x93.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-1024x316.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-765x236.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-1536x474.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-2048x632.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-486x150.png 486w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-100x31.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-1134x350.png 1134w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-6-788x243.png 788w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_8_Disk_Usage_to_a_Particular_Level\"><\/span>Example 8: Disk Usage to a Particular Level<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">I guess it is safe to assume that you will see some <strong>directories <\/strong>with a lot of <strong>subdirectories <\/strong>and those <strong>subdirectories <\/strong>may have some subdirectories as well and so on. While using the <strong>du <\/strong>command in <strong>Linux<\/strong>, it is up to you to which length you want to print the <strong>disk usage<\/strong>. To understand it better, follow the steps below with me. As you have guessed, I will use the <strong>walid <\/strong>directory here:<\/p>\n<ol>\n<li>At first press <strong>CTRL + ALT + T <\/strong>on your keyboard<\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -d 1 walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button from your keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">You will see an output like below. Now I have a question for you. What would happen if I put the number <strong>0 <\/strong>instead of <strong>1<\/strong>. You would only see the <strong>walid <\/strong>directory. I put the number <strong>1<\/strong>, that\u2019s why it is showing the <strong>myfolder subdirectory<\/strong> of <strong>walid<\/strong> <strong>directory<\/strong>. If I put the number <strong>3<\/strong>, it would have shown the <strong>subdiretories<\/strong> of the <strong>myfolder subdirectory<\/strong> as well (if available).<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3652 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7.png\" alt=\"Showing disk usage to a certain depth\" width=\"492\" height=\"119\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7.png 492w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-300x73.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-1024x248.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-765x185.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-1536x372.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-2048x495.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-620x150.png 620w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-100x24.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-1447x350.png 1447w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-7-788x190.png 788w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_9_Last_Modification_Time_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 9: Last Modification Time Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">It is also possible to view the <strong>last modification time<\/strong> of a file or directory using the <strong>du <\/strong>command in <strong>Linux<\/strong>. I will use the <strong>option \u201c&#8211;time\u201d <\/strong>here. I used the file <strong>hello <\/strong>here. Now the steps below with me:<\/p>\n<ol>\n<li>At first, launch an <strong>Ubuntu terminal<\/strong>.<\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du --time hello<\/code><\/pre>\n<\/li>\n<li>Press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p>In the output, you will two new columns, one showing the <strong>date <\/strong>and the other one <strong>time <\/strong>of the last modification.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3653 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8.png\" alt=\"Showing last modification time using the du command in Linux\" width=\"584\" height=\"92\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8.png 584w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-300x47.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-1024x161.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-762x120.png 762w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-1536x242.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-2048x323.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-952x150.png 952w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-100x16.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-8-788x124.png 788w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_10_Last_Access_Time\"><\/span>Example 10: Last Access Time<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">To view the <strong>last access time<\/strong>, you need to provide a value to the <strong>option \u201c&#8211;time\u201d<\/strong>. The value can be <strong>atime<\/strong>, <strong>access<\/strong>, <strong>use<\/strong>, <strong>ctime<\/strong> or <strong>status <\/strong>(see the <strong>manual <\/strong>page for more). As I want to see the last access time, I will use the value <strong>access<\/strong>. I used the file <strong>hello <\/strong>here as well:<\/p>\n<ol>\n<li>At first, open a <strong>terminal <\/strong>in <strong>Ubuntu<\/strong><\/li>\n<li>Type the following command in the <strong>terminal:<\/strong>\n<pre><code class=\"language-bash\" data-line=\"\">du --time=access hello<\/code><\/pre>\n<\/li>\n<li>Press <strong>ENTER <\/strong>from your keyboard<\/li>\n<\/ol>\n<p>Now you can see the l<strong>ast access time<\/strong>. And in our case, the last access time is different from the last modification time.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3654 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9.png\" alt=\"Printing last access time\" width=\"590\" height=\"92\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9.png 590w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-300x47.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-1024x160.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-763x119.png 763w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-1536x240.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-2048x319.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-962x150.png 962w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-100x16.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-9-788x122.png 788w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_11_Apparent_Size_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 11: Apparent Size Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\"><strong>Apparent<\/strong> and <strong>disk<\/strong> usage can be different. <strong>Disk usage<\/strong> means the <strong>physical space<\/strong> consumed by a file whereas <strong>apparent size<\/strong> counts the <strong>data<\/strong> on that file. I used the file <strong>hello <\/strong>here so that you can compare the result with <strong>example 1<\/strong>. You can do the following to know the <strong>apparent size:<\/strong><\/p>\n<ol>\n<li>At first open an <strong>Ubuntu terminal by <\/strong>pressing <strong>CTRL + ALT +T<\/strong>.<\/li>\n<li>Now type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du --apparent-size hello<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">So, you can see, the <strong>disk usage<\/strong> of the <strong>hello <\/strong>file is <strong>4 <\/strong>and the <strong>apparent size<\/strong> is <strong>1<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3655 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10.png\" alt=\"Apparent size using the du command in Linux\" width=\"626\" height=\"98\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10.png 626w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-300x47.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-1024x160.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-767x120.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-1536x240.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-2048x321.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-958x150.png 958w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-100x16.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-10-788x123.png 788w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_12_Disk_Usage_in_Specific_Block_Size\"><\/span>Example 12: Disk Usage in Specific Block Size<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The \u201c<strong>&#8211;block-size<\/strong>\u201d <strong>option <\/strong>in the <strong>du <\/strong>command in <strong>Linux <\/strong>is used to define your own scale. Let\u2019s say I want to see the disk usage on a scale of <strong>100<\/strong>, I need to provide <strong>100 <\/strong>as the value of that <strong>option<\/strong>. I will use the <strong>walid <\/strong>directory here. Now do the following with me:<\/p>\n<ol>\n<li>Launch an <strong>Ubuntu Terminal <\/strong>first.<\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">d --block-size=100 -s walid<\/code><\/pre>\n<\/li>\n<li>Then press the button <strong>ENTER <\/strong>from your keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">See, the output is on a scale of <strong>100 <\/strong>now. You can compare it with previous examples and see the difference.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3656 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11.png\" alt=\"Disk usage in a given scale\" width=\"644\" height=\"87\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11.png 644w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-300x41.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-1024x138.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-762x103.png 762w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-1536x208.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-2048x277.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-1110x150.png 1110w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-100x14.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-11-788x106.png 788w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<p><strong>Note:<\/strong> I used the <strong>option \u201c-s\u201d <\/strong>to view the summary. Using it is not mandatory.<\/p>\n<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Example_13_Disk_Usage_in_Human-Readable_Format_with_Power_of_1000\"><\/span>Example 13: Disk Usage in Human-Readable Format with Power of 1000<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Now let\u2019s say you want to view <strong>disk usage <\/strong>on a scale of <strong>1000<\/strong>. You can use the <strong>option \u201c&#8211;block-size\u201d <\/strong>from <strong>example 12<\/strong> and provide it a value of <strong>1000<\/strong>. Or, you can use the <strong>option \u201c&#8211;si\u201d <\/strong>which I will do here. I used the directory <strong>walid <\/strong>here. Follow the steps below:<\/p>\n<ol>\n<li>At first, open a <strong>terminal <\/strong>in <strong>Ubuntu<\/strong>.<\/li>\n<li>Type the command below in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du --si -s walid<\/code><\/pre>\n<\/li>\n<li>Now press the <strong>ENTER <\/strong>button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Now you can see the output on the scale of <strong>1000<\/strong> which is <strong>17k<\/strong>. When the scale <strong>1024 <\/strong>was used it was <strong>16k<\/strong>. So it totally makes sense.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3657 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12.png\" alt=\"Disk usage on the scale of power 1000 using the du command in Linux\" width=\"488\" height=\"94\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12.png 488w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-300x58.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-1024x197.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-763x147.png 763w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-1536x296.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-2048x394.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-779x150.png 779w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-100x19.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-1817x350.png 1817w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-12-788x151.png 788w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<strong>Note:<\/strong> I used the <strong>option \u201c-s\u201d <\/strong>to view the summary. Using it is not mandatory.<\/p>\n<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Example_14_Disk_Usage_in_the_scale_of_1MB_Using_the_%E2%80%9Cdu%E2%80%9D_command_in_Linux\"><\/span>Example 14: Disk Usage in the scale of 1MB Using the \u201cdu\u201d command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Viewing <strong>disk usage <\/strong>in the scale of <strong>1MB <\/strong>is also possible using the <strong>du <\/strong>command in <strong>Linux<\/strong>. For this purpose, you need to use the <strong>option \u201c-m\u201d<\/strong>. I used the <strong>walid <\/strong>directory here as well. You can do it with me by following the steps below:<\/p>\n<ol>\n<li>Press <strong>CTRL + ALT + T<\/strong> to open an <strong>Ubuntu Terminal<\/strong><\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">du -m -s walid<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>OR,<\/strong><\/span><\/p>\n<pre><code class=\"language-bash\" data-line=\"\">du -ms walid<\/code><\/pre>\n<\/li>\n<li>Press the <strong>ENTER <\/strong>button from your keyboard.<\/li>\n<\/ol>\n<p>As you can see, the output is now in the scale of <strong>1MB<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3658 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13.png\" alt=\"Disk usage on scale of 1MB\" width=\"528\" height=\"90\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13.png 528w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-300x51.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-1024x175.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-763x130.png 763w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-1536x262.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-2048x349.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-880x150.png 880w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-100x17.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-13-788x134.png 788w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\">\n<strong>Note:<\/strong> I used the <strong>option \u201c-s\u201d <\/strong>to view the summary. Using it is not mandatory.<\/p>\n<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">The <strong>du <\/strong>command in <strong>Linux <\/strong>is a useful command and you can use it on a day-to-day basis. Practicing the examples above will help you to have a farm grep on the <strong>du <\/strong>command in <strong>Linux<\/strong>.<\/p>\n<hr \/>\n<p><span style=\"color: #000080;\"><strong><span style=\"font-size: 18pt;\">Similar Readings<\/span><\/strong><\/span><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/shred-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cshred\u201d Command in Linux [9 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/dd-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cdd\u201d Command in Linux [7+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/mount-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cmount\u201d Command in Linux [15 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/mke2fs-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cmke2fs\u201d Command in Linux [10 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/mkfs-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cmkfs\u201d Command in Linux [4+ Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;3639&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;The \u201cdu\u201d Command in Linux [14 Practical Examples]&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>The du command in Linux is used to view disk space consumed by files and directories. It can be handy &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"The \u201cdu\u201d Command in Linux [14 Practical Examples]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/du-command-in-linux\/#more-3639\" aria-label=\"Read more about The \u201cdu\u201d Command in Linux [14 Practical Examples]\">Read more<\/a><\/p>\n","protected":false},"author":314893,"featured_media":3660,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[61],"class_list":["post-3639","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","tag-disc-management-commands","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The \u201cdu\u201d Command in Linux [14 Practical Examples]<\/title>\n<meta name=\"description\" content=\"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/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=\"The \u201cdu\u201d Command in Linux [14 Practical Examples]\" \/>\n<meta property=\"og:description\" content=\"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/du-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/walid.alasad.5\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-12T11:34:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T09:30:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Walid Al Asad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Walid Al Asad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/\"},\"author\":{\"name\":\"Walid Al Asad\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\"},\"headline\":\"The \u201cdu\u201d Command in Linux [14 Practical Examples]\",\"datePublished\":\"2023-01-12T11:34:11+00:00\",\"dateModified\":\"2024-01-14T09:30:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/\"},\"wordCount\":2102,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/du-command-in-linux-15.png\",\"keywords\":[\"disc management commands\"],\"articleSection\":[\"Linux Commands\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/\",\"name\":\"The \u201cdu\u201d Command in Linux [14 Practical Examples]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/du-command-in-linux-15.png\",\"datePublished\":\"2023-01-12T11:34:11+00:00\",\"dateModified\":\"2024-01-14T09:30:17+00:00\",\"description\":\"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/du-command-in-linux-15.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/du-command-in-linux-15.png\",\"width\":500,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/du-command-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The \u201cdu\u201d Command in Linux [14 Practical Examples]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\",\"name\":\"Walid Al Asad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"caption\":\"Walid Al Asad\"},\"description\":\"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/walid.alasad.5\",\"https:\\\/\\\/www.instagram.com\\\/alasadwalid\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/walid-al-asad\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/walid\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The \u201cdu\u201d Command in Linux [14 Practical Examples]","description":"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.","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:\/\/linuxsimply.com\/du-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"The \u201cdu\u201d Command in Linux [14 Practical Examples]","og_description":"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.","og_url":"https:\/\/linuxsimply.com\/du-command-in-linux\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/walid.alasad.5","article_published_time":"2023-01-12T11:34:11+00:00","article_modified_time":"2024-01-14T09:30:17+00:00","og_image":[{"width":500,"height":500,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png","type":"image\/png"}],"author":"Walid Al Asad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Walid Al Asad","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/"},"author":{"name":"Walid Al Asad","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0"},"headline":"The \u201cdu\u201d Command in Linux [14 Practical Examples]","datePublished":"2023-01-12T11:34:11+00:00","dateModified":"2024-01-14T09:30:17+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/"},"wordCount":2102,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png","keywords":["disc management commands"],"articleSection":["Linux Commands"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/du-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/","url":"https:\/\/linuxsimply.com\/du-command-in-linux\/","name":"The \u201cdu\u201d Command in Linux [14 Practical Examples]","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png","datePublished":"2023-01-12T11:34:11+00:00","dateModified":"2024-01-14T09:30:17+00:00","description":"The du command in Linux is used to track disk usage. This is a useful tool for all types of users and specially for systems with low storage.","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/du-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/du-command-in-linux-15.png","width":500,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/du-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"The \u201cdu\u201d Command in Linux [14 Practical Examples]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0","name":"Walid Al Asad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","caption":"Walid Al Asad"},"description":"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/walid.alasad.5","https:\/\/www.instagram.com\/alasadwalid\/","https:\/\/www.linkedin.com\/in\/walid-al-asad\/"],"url":"https:\/\/linuxsimply.com\/author\/walid\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/3639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314893"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=3639"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/3639\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/3660"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=3639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=3639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=3639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}