du

BSD du Cheatsheet #

du estimates and reports the disk usage of files and directories. It provides information on the disk space used by files and directories in BSD systems.

Basic Usage #

Command/OptionExampleDescription
duduDisplay disk usage of the current directory and its subdirectories
du -hdu -hShow sizes in human-readable format (e.g., KB, MB, GB)
du -kdu -kShow sizes in kilobytes (default)
du -mdu -mShow sizes in megabytes
du -sdu -sDisplay only the total for each argument

Specific Directories #

Command/OptionExampleDescription
du /pathdu /home/userDisplay disk usage for the specified path

Advanced Usage #

Command/OptionExampleDescription
du -d <depth>du -d 2Limit the depth of directory traversal

This cheatsheet covers essential du commands and options for BSD systems.

du

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.