du
Syntax
du [options] [
directories_or_files
]
Options
-a
displays usage information for all files (not just directories).
-b
displays usage in bytes (instead of kilobytes).
-c
displays a grand total of all usage information.
-k
displays usage information in kilobytes (default).
-s
displays total disk usage without per directory details.
Description
The du
command displays the disk space (in kilobytes) the specified files or directories use. By default, du
displays the disk space that each directory and subdirectory uses. A common use of du
is to view the total space the current directory uses. For example, here is how you might check the details of disk space the /var/log
directory uses:
du /var/log
4 /var/log/vbox
4 /var/log/httpd
4 /var/log/squid
4 /var/log/samba
3312 /var/log/cups
8 /var/log/gdm
4 /var/log/news/OLD
8 /var/log/news
3696 /var/log