mdu
system informationLinux/Unix
The mdu command is one of the most frequently used commands in Linux/Unix-like operating systems. mdu Display disk usage in megabytes
Quick Reference
Command Name:
mdu
Category:
system information
Platform:
Linux/Unix
Basic Usage:
mdu [options] [arguments]
Common Use Cases
Syntax
mdu [options] [file...]
Options
| Option | Description |
|---|---|
-a, --all |
Write counts for all files, not just directories |
-b, --bytes |
Display size in bytes |
-c, --total |
Produce a grand total |
-d, --max-depth=N |
Print the total for directories only N or fewer levels deep |
-h, --human-readable |
Print sizes in human readable format (e.g., 1M, 3.7G) |
--si |
Like -h, but use powers of 1000 not 1024 |
-k, --kilobytes |
Display size in kilobytes |
-m, --megabytes |
Display size in megabytes (default) |
-s, --summarize |
Display only a total for each argument |
-S, --separate-dirs |
Do not include size of subdirectories |
-t, --threshold=SIZE |
Exclude entries smaller than SIZE |
-x, --one-file-system |
Skip directories on different file systems |
--exclude=PATTERN |
Exclude files that match PATTERN |
-0, --null |
End each output line with NUL, not newline |
Examples
How to Use These Examples
The examples below show common ways to use the mdu command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.