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