Operations 16 min read

Fast Alternatives to du: ncdu, dust, duu, diskus, and tin‑summer on Linux

When a Linux filesystem reaches 80 % capacity and cannot be expanded, this guide shows how to identify and clean large directories using faster du replacements such as ncdu, dust, duu, diskus, and tin‑summer, with installation steps, command‑line options, and benchmark comparisons.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Fast Alternatives to du: ncdu, dust, duu, diskus, and tin‑summer on Linux

Why replace du?

The traditional du command can become very slow on large or nearly‑full filesystems. Modern replacements written in C or Rust provide faster, interactive output and additional filtering options.

ncdu

ncdu is a lightweight ncurses‑based disk‑usage analyzer written in C.

Installation (Ubuntu 21.10) # sudo apt-get install ncdu Basic usage ncdu [directory] Run ncdu in a directory to open an interactive UI. Use the arrow keys to navigate, Enter to drill down, d to delete a selected entry, and q to quit.

Common options -h – show help -q – quiet mode (refresh every 2 s) -v – version -x – stay on the same filesystem -e – enable extended info -r – read‑only -o FILE – export scan to a file -f FILE – import scan from a file --si – use decimal SI prefixes --exclude PATTERN – exclude matching files -X, --exclude-from FILE – exclude patterns listed in a file -L, --follow-symlinks – follow symlinks (files only) --exclude-caches – skip directories containing

CACHEDIR.TAG
--exclude-kernfs

– skip kernel pseudo‑filesystems (procfs, sysfs, cgroup…) --confirm-quit – ask for confirmation before exiting --color SCHEME – set colour scheme

dust

dust (du + Rust) provides a more intuitive, colourised output and supports file‑type filtering.

Installation (Ubuntu 21.10)

# wget https://github.com/bootandy/dust/releases/download/v0.7.1/du-dust_0.7.1_amd64.deb
# dpkg -i du-dust_0.7.1_amd64.deb

Basic usage dust [FLAGS] [OPTIONS] [--] [inputs]... Key flags -f – show file count instead of size -s – use file length rather than block size -p – display full paths --exclude PATTERN – exclude matching files

duu

duu (Directory Usage Utility) is a cross‑platform Python script that reports sizes in kilobytes.

Installation (Ubuntu 21.10)

# wget https://github.com/jftuga/duu/archive/refs/tags/v2.22.tar.gz
# tar -zxvf v2.22.tar.gz
# cd duu-2.22
# python3 duu.py --help

Typical usage

# python3 duu.py               # current directory
# python3 duu.py /etc/init.d/   # specific path

Common options -h – help -b – suppress summary/statistics (useful for sorting) -e – summarise file extensions -q – quiet (do not list individual directories) -s – send processing status to STDERR -n – skip hidden directories (starting with .) -N – non‑recursive -f – show file count per directory -S – show mean, median, mode and standard deviation -H – human‑readable numbers -T THREADS – number of concurrent threads (useful on SAN) -x EXCLUDE – case‑insensitive exclude list (colon‑separated) -X REGEXPR – case‑insensitive regex exclude list -o OUTPUT – write results to CSV

diskus

diskus is a Rust‑based tool that aims to replace du -sh with multithreaded performance.

Installation (Ubuntu 21.10)

# wget https://github.com/sharkdp/diskus/releases/download/v0.7.0/diskus_0.7.0_amd64.deb
# dpkg -i diskus_0.7.0_amd64.deb

Basic usage diskus [OPTIONS] [path]... Important options -j – set thread count and output unit (default: 3 × cores, decimal MB) -b – compute apparent size instead of disk usage -v – show version / do not hide filesystem errors -h – help

Examples

# du -sh /etc               # traditional du
# diskus /etc               # diskus equivalent
# diskus -j8 -b /var        # use 8 threads, apparent size

Benchmark (15 GB folder, 100 k directories, 400 k files) on an 8‑core laptop using hyperfine

Cold cache (mean ± σ, seconds):

Command          Mean   Min   Max   Relative
------------------------------------------------
 diskus          1.746  1.728 1.770 1.00
 du -sh          17.776 17.139 18.413 10.18
 sn p -d0 -j8    18.094 17.482 18.579 10.36
 dust -d0        21.357 20.974 21.759 12.23

Hot cache (mean ± σ, seconds):

Command          Mean    Min    Max   Relative
------------------------------------------------
 diskus          500.3   472.9  530.6   1.00
 du -sh         1098.3 1087.8 1122.4   2.20
 sn p -d0 -j8   1122.2 1107.3 1170.1   2.24
 dust -d0       3532.1 3490.0 3563.1   7.06

tin‑summer (sn)

tin‑summer, invoked as sn, is a Rust‑based du replacement that reads file sizes (not allocated blocks) and offers colourised, human‑readable output with multithreading.

Installation

# curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git vmchale/tin-summer
# or, if Rust is installed:
# cargo install tin-summer

Typical commands sn f – list file sizes in the current directory sn f <path> – list sizes for a specific directory sn ar – search for build artefacts sn ar -t200M – list items larger than 200 MiB sn sort $DIR -n12 – show the 12 largest entries in $DIR Benchmark (selected directory sizes)

Directory   Tool   Command   Time (ms)
-----------------------------------
600 MB      sn     sn p      60.74
600 MB      sn     sn d      99.92
600 MB      du     du -hacd2 88.28
4 GB        sn     sn p     185.2
4 GB        sn     sn d     271.9
4 GB        du     du -hacd2 195.5
700 MB      sn     sn p      91.05
700 MB      sn     sn d     176.3
700 MB      du     du -hacd2 153.8
7 MB        sn     sn p      19.48
7 MB        sn     sn d      12.72
7 MB        du     du -hacd2 10.13

References

dust: https://github.com/bootandy/dust/

duu: https://github.com/jftuga/duu

diskus: https://github.com/sharkdp/diskus/

tin‑summer (sn): https://github.com/vmchale/tin-summer

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

disk usagencdudiskusdustduutin-summer
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.