Mastering Duc: Visual Disk Usage Analysis for Linux Systems
This guide introduces the open‑source Duc tool, explains its supported interfaces and database back‑ends, provides step‑by‑step installation instructions for Debian‑based and source builds, and demonstrates core commands for indexing, querying, and visualizing disk usage on Linux.
What Is Duc?
Duc is an open‑source utility suite for Unix‑like operating systems that builds indexes, inspects, and visualizes disk usage. It scales to extremely large file systems, handling hundreds of millions of files and petabyte‑scale storage without issues.
Supported Interfaces
Command‑line interface
Ncurses terminal interface
X11 graphical user interface
OpenGL graphical user interface
Supported Database Back‑Ends
Tokyocabinet (default)
LevelDB
SQLite3
Installation
On Debian‑based distributions: sudo apt-get install duc From source:
wget https://github.com/zevv/duc/releases/download/1.4.4/duc-1.4.4.tar.gz tar -xzf duc-1.4.4.tar.gz
cd duc-1.4.4
./configure
make
sudo make installBasic Usage
1. Create a database index duc index /home This creates an index for /home and stores it in $HOME/.duc.db. Re‑run the command after adding files to update the index.
2. Query the index duc info Shows summary information such as date, time, file count, directory count, size, and path. duc ls Lists files and directories in the current working directory. duc ls /home/alvin/Downloads Lists contents of a specific directory. duc help ls Displays help for a particular subcommand.
3. Visualize disk usage
Use the ls subcommand with chart options: duc ls -Fg /home/alvin The -F flag appends file‑type indicators, and -g draws a graphical bar representing relative size. If no directory is specified, the current directory is used.
Tree view: duc ls -R /home/alvin Opens an ncurses UI: duc ui /home/alvin Opens a graphical X11 UI: duc gui /home/alvin Example chart outputs are shown in the images below:
For a complete list of commands and options, consult the manual page:
man ducSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
