Skip to content

Writing criteria for this guide

Every "for Mere Mortals" guide is written to the same nine-point standard, so a reader who trusts one can trust the rest. Here it is, with the verification notes for this particular guide below.

  1. Fix it first. Reader outcomes lead, not action items: each chapter opens by naming the outcome it delivers, shows a check the reader can run to confirm they got it, and a reasonable reader finishes able to state what was done, what it means, and what to try next.
  2. Plain language. Short sentences, everyday vocabulary, technical terms defined on first use. No slang, and no idioms that only make sense in one country — the reader may be translating as they go.
  3. No dead ends. A guide never tells the reader to do something it cannot show them how to verify. Every claim a reader relies on — an install, a command, an output — is something this guide demonstrates or clearly labels documented-only below.
  4. Live-verified where it matters. Procedures are run for real in the guide's lab wherever the build machine allows it, and the transcripts kept in the repository are the evidence. What could not be run is listed honestly below, never presented as if it had been.
  5. General audiences. Nothing in this guide — examples, fixtures, names, addresses — is modelled on any particular reader or author's real life, network, or organisations. The lab's sentences are stock sentences and pangrams.
  6. Standalone. A reader needs this guide, its lab, and nothing else. Where another guide would genuinely help, it is pointed to once, by name, and the chapter still completes without it.
  7. Honest about limits. Chapter 13 names what the tool cannot do: whole filesystems only, never the files inside them; a default view whose filter can hide the very filesystem asked about, root included; percentages and roundings that differ from df's by design; inode figures that read 0.0% where the honest answer is "not applicable"; ascending-only sorting; and one snapshot per run, with no history, alerts or memory.
  8. The ethics rule is in the text, early. Duf raises no interception or scanning question — it reads only the local machine's own mount table and sends nothing anywhere — but chapter 1 draws its line plainly before any procedure: duf is a read-only reporter to be run on machines that are yours to inspect, and its output is a map of a machine (mounts, types, sizes) to be shared with the care any inventory deserves.
  9. Builds clean. The site builds with MkDocs in strict mode with no warnings, and a fresh reader following the chapters in order reaches the stated outcome of each.

Verification notes for this guide

The build machine is a 2-CPU, 7.7 GB Ubuntu 24.04 sandbox, shared with other work while the lab ran. Duf 0.9.1 (b2f01a1ecbfd1af63015b83296c50a95260f97b1, built 2025-09-08) was installed from the official release archive duf_0.9.1_linux_x86_64.tar.gz, its SHA-256 verified against the release checksums.txt before unpacking, and run unmodified. The sandbox's mount table is unusually crowded — 76 mounts, mostly bind mounts and tmpfs instances belonging to the machine's own plumbing, with a btrfs home volume, a 200 GB data volume and an overlay root — which makes several of duf's behaviours (filtering, grouping, double counting) easier to see than a tidy desktop would. All transcripts live in duf-lab/transcripts/; the cross-checking script is duf-lab/check-json.py.

The lab's terminal was a capture pipe, not a screen, and the pseudo-terminal used for the colour work never answered duf's background-colour query. The usage bar's glyphs and the colour codes wrapped around it were captured as bytes (t09), but no colour ever resolved: under dark, light and ansi themes alike the emitted sequence was empty. Every statement about actual colours, and about the differences between themes, is therefore documented-only below, and the guide says so where it matters.

Run for real, with transcripts as evidence:

  • Install: the release archive's contents (the binary and its manual page), the checksum verification, the full --version string and the complete --help text (t00).
  • The default view (19 local + 34 special devices) beside df -h (11 rows) on the same machine at the same moment; path arguments for /, /tmp and the home volume, including the root filesystem's silent absence from the default view (t01).
  • The missing-root diagnosis: the kernel's mount list at 76 entries, --all restoring the root row, the JSON containing all 76 with and without --all, and the exit codes of the silent answers (t02).
  • Sorting by size and by usage across the local group, and by avail under a mount-point filter (t03).
  • Groups: --only local, --only special, --only network (empty, exit 0 — the machine has no network filesystems), --hide special, and the default vs --all group counts (53 vs 76 rows); --warnings producing no warnings (t04).
  • Filtering by filesystem type, by mount point with wildcards on both the show and hide sides, several paths as arguments, and the --all repair of a vanished path — including the path-mode row whose type labels did not match its numbers on this multiply-mounted machine (t05).
  • JSON: one full object read field by field; the lab checker comparing the root filesystem's figures with df --output -B1 / and finding total, used and free identical to the byte; the sum of all totals (2,881.4 GB) and its double-counting warning; jq counts and queries, including 39 tmpfs mounts of 76; and --json ignoring --only local, still emitting all 76 (t06).
  • Inodes: --inodes against df -i on /tmp, agreeing exactly (1,015,613 inodes, 80 used at that moment), and both tools reporting 0 inodes on the btrfs volume, df with a dash and duf with a misleading 0.0% (t07).
  • Columns and thresholds: --output with block fields and with inode fields mixed in; --usage-threshold and --avail-threshold leaving every number unchanged, as they should — they steer colour only (t08).
  • Terminal behaviour: 80-column output when piped, --width 60 wrapping, the bar present in narrow tables and dropped from the full seven-column table at width 80, --style ascii with its bracketed bar, and the pseudo-terminal captures (via script) showing the background-colour query at startup and the bar's empty colour sequence under all three themes (t09).
  • Failures: an unknown flag (usage page, exit 2), a nonexistent path (lstat /no: no such file or directory, exit 1), jq answering null for the field name size where the real field is total, an unknown group name, and an unknown sort column answered with the valid list (t10).
  • Recipes: the over-90%-full jq report (six 100%-full read-only system images on this machine), the worst-first tail of a usage sort, and an inode count for /tmp from the JSON (t11).

Documented only — described from the project's documentation, not run, and the text does not claim otherwise:

  • The colours themselves: which green, yellow and red the themes paint, and how dark, light and ansi differ on a real terminal. The codes' presence and the bar's glyphs were captured; the paint was never seen.
  • Network filesystems in the table: the network group was exercised only as an empty, successful answer. How duf displays a live NFS or Samba mount is described, not demonstrated.
  • The distribution packages and Homebrew install routes, the .deb / .rpm / .apk release packages, and duf on macOS, Windows and the BSDs — the lab ran the Linux release binary only.
  • The neighbour tools of chapter 12 beyond df (dust, ncdu, du, lsblk, the system monitors) — characterised from their documentation and this series' guides to them, not run or benchmarked here.
  • Behaviour on filesystems the sandbox does not have — ext4 root volumes, LVM on a desktop, removable media — including how often the default filter hides a root filesystem there. The lab's root-hiding case is one overlay in one sandbox, reported as exactly that.

Fixtures are this guide's own and deliberately generic: the lab read only its own sandbox's mounts, used invented path names for its failure cases, and modelled nothing on any real person's machines or network. Duf itself needed no fixtures at all — it reports the machine it runs on, and this guide's machine was the sandbox and nothing else.