info
-
duestimates and displays thedisk spaceused by files -
size format
-
size is an integer and optional unit
-
units are
K,M,G,T,P,E,Z,Y
-
demo
-
-
report the size of each file in current directory with the
extension .txt$ du -s *.txt -
bu in a
human-readablesize format$ du -shc *.txt
-
-
-
without any options shows the
namesandused spacefor each directories including all sub-directories in thecurrent directory$ du 64 ./.ipynb_checkpoints 1395520 ./backup 64 ./infocatalog/ETLService 25192 ./infocatalog 1417488 ./input 364752 ./output 288 ./sql 3203424 . -
pass
-sto seetotaldisk space used by a directory$ du -sh 1.5G . $ du -sh backup/ input/ output/ 681M backup/ 692M input/ 178M output/ -
pass
-cto see agrand totalfor all of the files$ du -csh backup/ input/ output/ 681M backup/ 692M input/ 178M output/ 1.5G total
-