Site icon LinuxCommands.site

du command tutorial in linux/unix with examples and use cases

Linux du command – estimate file space usage

Linux du command recursively summarizes the disk usage of a file or directory.

Syntax

 du [OPTION]... [FILE]...

Options

Examples & Use Cases

Show the space used by a directory or file

In the following example, we use the du -aBK option to display the disk space used by all directories and files in the current directory.

 ➜  du -aBK

Show file disk space usage

In the following example, we use the df -sh option to display disk space usage of a single file.

➜  du -sh install.sh

Exit mobile version