May 2017
Beginner
552 pages
28h 47m
English
To find the disk space used by a file (or files), use the following command:
$ du FILENAME1 FILENAME2 ..
Consider this example:
$ du file.txt
To obtain the disk usage for all files inside a directory, along with the individual disk usage for each file shown in each line, use this command:
$ du -a DIRECTORY
The -a option outputs results for all files in the specified directory or directories recursively.
Consider this example:
$ du -a test
4 test/output.txt
4 test/process_log.sh
4 test/pcpu.sh ...