TOOL » LINUX » PACKAGE

Du

Usage

Estimate file space usage.

shell
du OPTION FILE
OptionDescription
-a --allPrint file sizes too.
--apparent-sizePrint apparent sizes rather than device usage.
-c --totalProduce a grand total.
-d --max-depthGo up to the specified depth.
-h --human-readablePrint sizes in powers of 1024.
--siPrint sizes in powers of 1000.
-s --summarizeDisplay only a total for each argument.

Examples

Size of a folder:

shell
du -sh folder

Find the 5 biggest files:

shell
find . -type f -exec du -h '{}' \+ | sort -hr | head -n 5