info
-
du
estimates and displays thedisk space
used 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-readable
size format$ du -shc *.txt
-
-
-
without any options shows the
names
andused space
for 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
-s
to seetotal
disk space used by a directory$ du -sh 1.5G . $ du -sh backup/ input/ output/ 681M backup/ 692M input/ 178M output/
-
pass
-c
to see agrand total
for all of the files$ du -csh backup/ input/ output/ 681M backup/ 692M input/ 178M output/ 1.5G total
-