On Debian (and most Linux systems), the du command itself does not natively show progress while calculating disk usage. However, you can use alternative tools or workarounds to monitor progress. Here are the best options:
pv (Pipe Viewer)pv is a command-line tool that monitors the progress of data through a pipe. You can combine it with du to estimate progress.
pv:bashsudo apt update && sudo apt install pv
bashfind /path/to/directory -type f -print0 | pv -l -s $(find /path/to/directory -type f | wc -l) | xargs -0 du -sh
pv to show progress as du processes them.ncdu (NCurses Disk Usage)ncdu is a more interactive and user-friendly alternative to du. It shows progress as it scans directories.
ncdu:bashsudo apt update && sudo apt install ncdu
bashncdu /path/to/directory
ncdu will scan the directory and show a progress bar.gdu (Fast Disk Usage Analyzer)gdu is a modern, fast alternative to du with a progress bar.
gdu:bashsudo apt update && sudo apt install gdu
bashgdu /path/to/directory
gdu shows a progress bar as it scans.progress (Linux Process Progress Viewer)The progress tool can monitor the progress of coreutils commands like du.
progress:bashsudo apt update && sudo apt install progress
Run du in one terminal:
bashdu -sh /path/to/directory
In another terminal, run:
bashprogress -w
du if it supports it (works best with dd, cp, etc., but may not always work with du).ionice and nice for Background MonitoringIf you just want to run du in the background and check its progress occasionally, you can use:
bashionice -c 3 nice -n 19 du -sh /path/to/directory > du_progress.log & tail -f du_progress.log
du with low priority and logs output to a file.tail -f to monitor the log in real-time.pvsudo apt install pvncdusudo apt install ncdugdusudo apt install gduprogresssudo apt install progressRecommendation: For a progress bar and interactive exploration, use ncdu or gdu. For a simple progress bar, use pv.
Vibe can make mistakes. Check answers. Learn more