du, stands for disk usage, remains a popular tool to estimate file space usage. It’s part of coreutils, a package of GNU software containing implementations for many of the basic tools which are used on Unix-like operating systems.
There’s many projects that look to improve on these tools. duf is one of the best. It’s a polished alternative to du which offers better presentation of information. We can tailor output to exactly what’s needed. For example, we can show and hide specific tables, as well as specific filesystems. We can also show or hide specific columns.
Portions of duf’s code are copied and modified from gopsutil, a port of psutil. psutil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network, sensors).
Developer: Christian Muehlhaeuser
License: MIT license
duf is written in Go. Learn Go with our recommended free books and free tutorials.
Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation
Page 3 – Summary
Complete list of articles in this series:
|Abricotine||Markdown editor with inline preview functionality|
|AES Crypt||Encrypt files using the Advanced Encryption Standard|
|Ananicy||Shell daemon created to manage processes’ IO and CPU priorities|
|broot||Next gen tree explorer and customizable launcher|
|Cerebro||Fast application launcher|
|cheat.sh||Community driven unified cheat sheet|
|CopyQ||Advanced clipboard manager|
|croc||Securely transfer files and folders from the command-line|
|Deskreen||Live streaming your desktop to a web browser|
|duf||Disk usage utility with more polished presentation than the classic df|
|exa||A turbo-charged alternative to the venerable ls command|
|Extension Manager||Browse, install and manage GNOME Shell Extensions|
|fd||Wonderful alternative to the venerable find|
|fkill||Kill processes quick and easy|
|fontpreview||Quickly search and preview fonts|
|horcrux||File splitter with encryption and redundancy|
|Kooha||Simple screen recorder|
|KOReader||Document viewer for a wide variety of file formats|
|Imagine||A simple yet effective image optimization tool|
|LanguageTool||Style and grammar checker for 30+ languages|
|Liquid Prompt||Adaptive prompt for Bash & Zsh|
|lnav||Advanced log file viewer for the small-scale; great for troubleshooting|
|lsd||Like exa, lsd is a turbo-charged alternative to ls|
|McFly||Navigate through your bash shell history|
|mdless||Formatted and highlighted view of Markdown files|
|Nushell||Flexible cross-platform shell with a modern feel|
|nvitop||GPU process management for NVIDIA graphics cards|
|OCRmyPDF||Add OCR text layer to scanned PDFs|
|Oh My Zsh||Framework to manage your Zsh configuration|
|Paperwork||Designed to simplify the management of your paperwork|
|PDF Mix Tool||Perform common editing operations on PDF files|
|peco||Simple interactive filtering tool that's remarkably useful|
|ripgrep||Recursively search directories for a regex pattern|
|Rnote||Sketch and take handwritten notes|
|scrcpy||Display and control Android devices|
|Sticky||Simulates the traditional “sticky note” style stationery on your desktop|
|tldr||Simplified and community-driven man pages|
|tmux||A terminal multiplexer that offers a massive boost to your workflow|
|Tusk||An unofficial Evernote client with bags of potential|
|Ulauncher||Sublime application launcher|
|Watson||Track the time spent on projects|
|Whoogle Search||Self-hosted and privacy-focused metasearch engine|
|Zellij||Terminal workspace with batteries included|
What’s the performance like?
Pretty good considering it’s written in Go
I like duf, it’s really pretty cool.
One thing that’s bad is the way it includes the reserved spaced that file systems use. There’s about 5% of the space allocated for root on a filesystem.
This means that duf’s output is inconsistent with df.
That’s true. But which one is right?