theshell.ch/site/pages/fs/du.html

30 lines
836 B
HTML
Raw Normal View History

---
layout: page
category-page: fs
category-title: FileSystem
tags: disk usage file size
author: Joey Bevilacqua
title: du
---
The <code>du</code> command is used to display files and directories sizes.<br>
The name stands for <i>Disk Usage</i>.
<pre>
du [flags] [file1] [file2] [directory1] ...
</pre>
<h3>Flags</h3>
<ul>
<li><b>-a</b>: shows the size of each individual file inside a given folder,
not the folder total size.
</li>
<li><b>-c</b>: shows the total size of all the files passed as arguments</li>
<li><b>-d</b>: select the max depth of folder recursion</li>
<li><b>-h</b>: shows the sizes in an human-readable format</li>
<li><b>-g</b>: shows the sizes with GB units</li>
<li><b>-m</b>: shows the sizes with MB units</li>
<li><b>-k</b>: shows the sizes with KB units</li>
</ul>