Skip to Content
gnux

-d, --max-depth

Print the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument.

An option of dux.

Usage

dux -d N [FILE]...
dux --max-depth=N [FILE]...

Details

ShortLongValueDefaultMeaning
-d--max-depthNprint the total for a directory (or file, with --all) only if it is N or fewer levels below the command line argument

Examples

Your home folder grew by 20 GB: see each folder's share of it as a bar, one level deep

dux -h -d 1 ~

Your disk is nearly full: list the 10 biggest directories in your home, largest first

dux -h -d 1 ~ | sortx -h -r | headx -n 11
Output
48G	/home/alice
21G	/home/alice/Videos
12G	/home/alice/.cache
6.3G	/home/alice/projects

Find which directory holds millions of tiny files (out of inodes)

dux --inodes -d 1 /var | sortx -n -r | headx

Report sizes in megabytes with the unit shown

dux -BM -d 1 /srv
Output
120M	/srv/www
2048M	/srv/backups
2169M	/srv

Help in the terminal

gnux help dux --max-depth

On this page