2018-11-15 22:31:10 +00:00
|
|
|
---
|
|
|
|
layout: page
|
|
|
|
category-page: fs
|
|
|
|
category-title: FileSystem
|
|
|
|
tags: disk usage file size
|
|
|
|
author: Joey Bevilacqua
|
|
|
|
title: du
|
2018-11-19 14:57:49 +00:00
|
|
|
previous-page: pages/fs/cp.html
|
2018-11-18 20:38:56 +00:00
|
|
|
next-page: pages/fs/ln.html
|
2018-11-15 22:31:10 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
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>
|