Modern Replacements for df
duf and dysk compared as replacements for df: platforms, filtering, sorting, and JSON or CSV export for scripts.
Updated
short verdict
Pick duf if you want a df replacement that runs on Linux, BSD, macOS and Windows, with device and filesystem-type filters and color thresholds. Pick dysk if you only need Linux or macOS and want selectable columns plus CSV as well as JSON export.
df prints one plain-text row per mounted filesystem, including many special mounts, and offers limited filtering and no structured output. duf and dysk both list filesystems in a table you can filter and sort, and both export JSON. They differ in platform coverage, filter model and export formats.
this page is for
- Developers who want a readable df on Linux, BSD, macOS or Windows
- Admins who need structured JSON or CSV output from disk reports
- Anyone hiding loop, bind, tmpfs or fuse mounts from a disk listing
A df replacement written in Go that covers the most platforms and has the most documented filtering and sorting options.
best for
- Cross-platform use including Windows and BSD
- Hiding loops, binds, tmpfs or fuse mounts
- Color-coded usage at a glance
strengths
- Runs on Linux, BSD, macOS and Windows
- Filters by device type (local, network, fuse, special, loops, binds), filesystem type, and mount point wildcards
- Sorts by size, usage, available space or filesystem type, and shows or hides columns including inodes
- Exports JSON; packaged for Homebrew, APT and Pacman
weaknesses
- Export is JSON only; CSV is not documented
- Colors adapt to the terminal theme and width, so plain-text parsing is better done through the JSON output
A table-based filesystem lister for Linux and macOS with column selection, filtering, sorting, and JSON and CSV export.
best for
- Linux or macOS users who want to pick exactly which columns to show
- Scripts that consume CSV or JSON
strengths
- Customizable columns for mount point, available space, filesystem type and usage
- Exports JSON and CSV
- Filters and sorts by column
- Built on the lfs-core Rust crate for filesystem data collection
weaknesses
- Linux and macOS only; Windows and BSD are not listed
- Install methods are not documented by the project
- Specific filter options and color thresholds are not documented
What changes compared to df
Both tools replace df's plain rows with a formatted table and add filtering and structured output.
- Output is a formatted table; duf adapts colors to your terminal theme and width
- duf filters by device type, filesystem type and mount point, with wildcard matching
- duf shows block usage by default and can show inode information
- Columns can be shown, hidden or chosen, in duf and in dysk
- JSON export is available in both; dysk also exports CSV
When not to use these
- You need a tool that is guaranteed to exist on every minimal server or container image, where df is already present
- You need per-directory usage rather than per-filesystem free space
FAQ
- Are duf and dysk drop-in replacements for df in scripts?
- Flag compatibility with df is not documented for either tool. Both export JSON, and dysk also exports CSV, so parsing structured output is the documented route for scripts.
- Which df replacement works on Windows?
- duf runs on Linux, BSD, macOS and Windows. dysk is documented for Linux and Mac only.
- Can I hide loop devices and tmpfs mounts?
- duf can show or hide loops, binds, fuse, network, local and special devices, and filter by filesystem type such as tmpfs or vfat. dysk documents filtering but not these specific options.
- Can I sort the output by free space?
- duf sorts by size, usage, available space or filesystem type. dysk supports sorting by different columns.