AI Crawler · Collection Records

Bot summary · Last 24 hours

duf — modern df

A df replacement tool that beautifully displays disk free space in a table.
Markdown source·Anything to add or correct?

💬 "duf command"

duf is a replacement for the modern df that shows disk free space in a pretty table.

It displays usage and free space of mounted file systems. It outputs in a clean table without df's inconvenient line breaks.

  • Concept: Displays usage and free space of mounted file systems.
  • Main Features: Outputs in a clean table without df's inconvenient line breaks.
  • Advantages: Columns align neatly.
  • Use Case: Can view specific file systems only.

Installation and Download

duf can be installed via a package manager or the official script.

EnvironmentCommand
Ubuntu / Debiansudo apt install duf
Fedora / RHELsudo dnf install duf
Archsudo pacman -S duf
macOS (brew)brew install duf
Go installgo install github.com/muesli/duf@latest
Binary Downloadgithub.com/muesli/duf/releases

Verify the installation with duf --version.

Frequently Used Options

OptionDescription
--allDisplays all file systems.
--jsonOutputs in JSON format.
--sort sizeSorts by size.
--filterFilters specific mounts only.
-x tmpfsExcludes tmpfs.

Essential Command Combinations

  • duf --all — Check all mount statuses.
  • duf --sort size — View sorted by size.
  • duf --json | jq — Output as JSON for use in scripts.

💬 "Show me an example of using duf on an actual server"

Here is a step-by-step guide for situations commonly encountered on production servers.

Step 1 · Verify Installation

Check if it is installed.


duf --version || sudo apt install -y duf

Step 2 · Full Overview

Check all mount statuses.


duf --all

Step 3 · Check Sorting

View sorted by size.


duf --sort size

Actual Execution Output

Here is the result of checking the server's mount status with duf. The table aligns cleanly.

!duf command execution result

Production server

How It Is Used in Practice

1. Monitoring Script

Situation — Used in scripts that check disk space.


duf --json | jq -r '.[] | select(.size_bytes > 1000000000) | .mountpoint'

Result — A list of large mount points is displayed.

Key Point — JSON output is convenient for script processing.

2. Specific Mounts Only

Situation — Check only NFS mounts.


duf nfs

Result — Only NFS mount information is displayed.

Key Point — You can filter to view only the targets you need.

Actual Execution Output

This is the result sorted by size.

!duf command execution result 2

Production server

Points of Caution

  • Without root permissions, duf may not be able to see some mounts.
  • Inside containers, host mounts may not be visible correctly.
  • Since it shows the same information as df, it can be a direct replacement in existing monitoring scripts.
  • The --json output is useful when combined with jq in scripts.

Source (HTML): https://games.aidebatehub.com/programs/linux/modern/duf.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:30:59+09:00