How to Find Directory Size on Linux

du -sh /path/to/your/directory

Or from inside the directory:

du -sh .
  • -s → summarize (only total)
  • -h → human-readable (KB, MB, GB…)

Examples:

du -sh ~/Downloads
du -sh /var/log
du -sh /home/arch/big_project
du -sh .

du -sh * | sort -h

Sorted smallest → largest

Biggest first:

du -sh * | sort -hr

du -h . | sort -hr | head -n 10

Command What it shows Best for
du -sh .Total size of current directoryQuick total
du -sh * | sort -hrSizes of everything directly inside (sorted biggest → smallest)Finding space hogs
du -h --max-depth=1 . | sort -hrSame as above but cleaner (GNU du only)Modern systems
du -sh --exclude='*.log' .Total size, ignoring all .log filesExcluding noisy files
du -h . | sort -h | tail -n 1515 largest items (smallest → biggest order)Discovering large items
ncdu .Interactive ncurses interfaceExploring interactively
dust .Beautiful, colorful, sorted outputModern / pretty alternative

ncdu – very popular interactive tool

sudo apt install ncdu    # Debian/Ubuntu
sudo dnf install ncdu    # Fedora
sudo pacman -S ncdu      # Arch

dust – modern readable alternative (GitHub)

# Install via cargo (Rust package manager)
cargo install dust
Pro tip: Most people just use du -sh and du -sh * | sort -hr — they cover ~95% of everyday use cases.
Quality, Reliability & Service
Thank You For Visiting
Brooks Computing Systems - Jacksonville
Visit https://bcs.archman.us