{"id":7324,"date":"2026-02-19T07:28:40","date_gmt":"2026-02-19T07:28:40","guid":{"rendered":"https:\/\/commandlinux.com\/?p=7324"},"modified":"2026-05-12T12:20:47","modified_gmt":"2026-05-12T12:20:47","slug":"du","status":"publish","type":"post","link":"https:\/\/commandlinux.com\/man-page\/du\/","title":{"rendered":"DU"},"content":{"rendered":"\n<link rel=\"stylesheet\" href=\"https:\/\/wordpress-541078-6199923.cloudwaysapps.com\/wp-content\/themes\/smart-mag\/man-style.css\"><script>document.title = \"DU linux command man page\";<\/script><div class='man-page' style='max-width:900px;margin:40px auto;'>\n\n<A NAME=\"lbAB\">&nbsp;<\/A>\n<H2>NAME<\/H2>\n\ndu &#8211; estimate file space usage\n<A NAME=\"lbAC\">&nbsp;<\/A>\n<H2>SYNOPSIS<\/H2>\n\n<B>du<\/B>\n\n[<I>OPTION<\/I>]&#8230; [<I>FILE<\/I>]&#8230;\n<BR>\n\n<B>du<\/B>\n\n[<I>OPTION<\/I>]&#8230; <I>&#8211;files0-from=F<\/I>\n<A NAME=\"lbAD\">&nbsp;<\/A>\n<H2>DESCRIPTION<\/H2>\n\n\n<P>\n\nSummarize disk usage of each FILE, recursively for directories.\n<P>\n\nMandatory arguments to long options are mandatory for short options too.\n<DL COMPACT>\n<DT><B>-0<\/B>, <B>&#8211;null<\/B><DD>\nend each output line with NUL, not newline\n<DT><B>-a<\/B>, <B>&#8211;all<\/B><DD>\nwrite counts for all files, not just directories\n<DT><B>&#8211;apparent-size<\/B><DD>\nprint apparent sizes, rather than disk usage; although\nthe apparent size is usually smaller, it may be\nlarger due to holes in (&#8216;sparse&#8217;) files, internal\nfragmentation, indirect blocks, and the like\n<DT><B>-B<\/B>, <B>&#8211;block-size<\/B>=<I>SIZE<\/I><DD>\nscale sizes by SIZE before printing them; e.g.,\n&#8216;-BM&#8217; prints sizes in units of 1,048,576 bytes;\nsee SIZE format below\n<DT><B>-b<\/B>, <B>&#8211;bytes<\/B><DD>\nequivalent to &#8216;&#8211;apparent-size <B>&#8211;block-size<\/B>=<I>1<\/I>&#8216;\n<DT><B>-c<\/B>, <B>&#8211;total<\/B><DD>\nproduce a grand total\n<DT><B>-D<\/B>, <B>&#8211;dereference-args<\/B><DD>\ndereference only symlinks that are listed on the\ncommand line\n<DT><B>-d<\/B>, <B>&#8211;max-depth<\/B>=<I>N<\/I><DD>\nprint the total for a directory (or file, with <B>&#8211;all<\/B>)\nonly if it is N or fewer levels below the command\nline argument;  <B>&#8211;max-depth<\/B>=<I>0<\/I> is the same as\n<B>&#8211;summarize<\/B>\n<DT><B>&#8211;files0-from<\/B>=<I>F<\/I><DD>\nsummarize disk usage of the\nNUL-terminated file names specified in file F;\nif F is -, then read names from standard input\n<DT><B>-H<\/B><DD>\nequivalent to <B>&#8211;dereference-args<\/B> (<B>-D<\/B>)\n<DT><B>-h<\/B>, <B>&#8211;human-readable<\/B><DD>\nprint sizes in human readable format (e.g., 1K 234M 2G)\n<DT><B>&#8211;inodes<\/B><DD>\nlist inode usage information instead of block usage\n<DT><B>-k<\/B><DD>\nlike <B>&#8211;block-size<\/B>=<I>1K<\/I>\n<DT><B>-L<\/B>, <B>&#8211;dereference<\/B><DD>\ndereference all symbolic links\n<DT><B>-l<\/B>, <B>&#8211;count-links<\/B><DD>\ncount sizes many times if hard linked\n<DT><B>-m<\/B><DD>\nlike <B>&#8211;block-size<\/B>=<I>1M<\/I>\n<DT><B>-P<\/B>, <B>&#8211;no-dereference<\/B><DD>\ndon&#8217;t follow any symbolic links (this is the default)\n<DT><B>-S<\/B>, <B>&#8211;separate-dirs<\/B><DD>\nfor directories do not include size of subdirectories\n<DT><B>&#8211;si<\/B><DD>\nlike <B>-h<\/B>, but use powers of 1000 not 1024\n<DT><B>-s<\/B>, <B>&#8211;summarize<\/B><DD>\ndisplay only a total for each argument\n<DT><B>-t<\/B>, <B>&#8211;threshold<\/B>=<I>SIZE<\/I><DD>\nexclude entries smaller than SIZE if positive,\nor entries greater than SIZE if negative\n<DT><B>&#8211;time<\/B><DD>\nshow time of the last modification of any file in the\ndirectory, or any of its subdirectories\n<DT><B>&#8211;time<\/B>=<I>WORD<\/I><DD>\nshow time as WORD instead of modification time:\natime, access, use, ctime or status\n<DT><B>&#8211;time-style<\/B>=<I>STYLE<\/I><DD>\nshow times using STYLE, which can be:\nfull-iso, long-iso, iso, or +FORMAT;\nFORMAT is interpreted like in &#8216;date&#8217;\n<DT><B>-X<\/B>, <B>&#8211;exclude-from<\/B>=<I>FILE<\/I><DD>\nexclude files that match any pattern in FILE\n<DT><B>&#8211;exclude<\/B>=<I>PATTERN<\/I><DD>\nexclude files that match PATTERN\n<DT><B>-x<\/B>, <B>&#8211;one-file-system<\/B><DD>\nskip directories on different file systems\n<DT><B>&#8211;help<\/B><DD>\ndisplay this help and exit\n<DT><B>&#8211;version<\/B><DD>\noutput version information and exit\n<\/DL>\n<P>\n\nDisplay values are in units of the first available SIZE from <B>&#8211;block-size<\/B>,\nand the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.\nOtherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n<P>\n\nThe SIZE argument is an integer and optional unit (example: 10K is 10*1024).\nUnits are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,&#8230; (powers of 1000).\n<A NAME=\"lbAE\">&nbsp;<\/A>\n<H2>PATTERNS<\/H2>\n\nPATTERN is a shell pattern (not a regular expression).  The pattern\n<B>?<\/B>\n\nmatches any one character, whereas\n<B>*<\/B>\n\nmatches any string (composed of zero, one or multiple characters).  For\nexample,\n<B>*.o<\/B>\n\nwill match any files whose names end in\n<B>.o<\/B>.\n\nTherefore, the command\n<DL COMPACT>\n<DT><DD>\n<B>du &#8211;exclude=&#8217;*.o&#8217;<\/B>\n\n<\/DL>\n<P>\n\nwill skip all files and subdirectories ending in\n<B>.o<\/B>\n\n(including the file\n<B>.o<\/B>\n\nitself).\n<A NAME=\"lbAF\">&nbsp;<\/A>\n<H2>AUTHOR<\/H2>\n\nWritten by Torbjorn Granlund, David MacKenzie, Paul Eggert,\nand Jim Meyering.\n<A NAME=\"lbAG\">&nbsp;<\/A>\n<H2>REPORTING BUGS<\/H2>\n\nGNU coreutils online help: &lt;http:\/\/www.gnu.org\/software\/coreutils\/<\/A>&gt;\n<BR>\n\nReport du translation bugs to &lt;http:\/\/translationproject.org\/team\/<\/A>&gt;\n<A NAME=\"lbAH\">&nbsp;<\/A>\n<H2>COPYRIGHT<\/H2>\n\nCopyright &#169; 2014 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later &lt;http:\/\/gnu.org\/licenses\/gpl.html<\/A>&gt;.\n<BR>\n\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n<A NAME=\"lbAI\">&nbsp;<\/A>\n\n<P>\n","protected":false},"excerpt":{"rendered":"<p>estimate file space usage<\/p>\n","protected":false},"author":1,"featured_media":7347,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-7324","post","type-post","status-publish","format-standard","has-post-thumbnail","category-man-page"],"_links":{"self":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/7324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/comments?post=7324"}],"version-history":[{"count":2,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/7324\/revisions"}],"predecessor-version":[{"id":10963,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/posts\/7324\/revisions\/10963"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/media\/7347"}],"wp:attachment":[{"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/media?parent=7324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/categories?post=7324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/commandlinux.com\/wp-json\/wp\/v2\/tags?post=7324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}