progress
Display progress for coreutils commands
TLDR
Show the progress of running coreutils
Monitor all running coreutils
Show the progress of running coreutils in quiet mode
Launch and monitor a single long-running command
Include an estimate of time remaining for completion
SYNOPSIS
progress [OPTION]...
PARAMETERS
-p <PID>, --pid=<PID>
Monitor specific process ID(s).
Can be a comma-separated list of PIDs.
-w, --wait
Wait for a supported command to start.
Exits only after the detected process has completed.
-m, --monitor
Continuously monitor matching processes.
Updates the display until interrupted or processes complete.
-c <CMD>, --command=<CMD>
Monitor specific command name(s).
Can be a comma-separated list of command names.
-q, --quiet
Suppress header and footer.
Shows only the progress line(s).
-o <FILE>, --output-file=<FILE>
Redirect output to a specified file.
-s <FIELD>, --sort=<FIELD>
Sort output by a specific field.
Fields include pid, command, speed, done, left, eta.
--full-path
Display the full path of commands.
--no-op
Only list supported processes, do not monitor.
Useful for checking which commands are detectable.
-v, --version
Display version information and exit.
-h, --help
Display help message and exit.
DESCRIPTION
progress is a lightweight C command that monitors the progress of currently running Linux commands, specifically those that perform file I/O operations. It's often referred to as coreutils-progress-indicator or cp-progress. It can attach to commands like cp, mv, dd, tar, gzip, cat, rsync, and certain package managers (dpkg, rpm).
Unlike pv which requires piping, progress works by inspecting the /proc filesystem. It scans for open file descriptors pointing to regular files and determines their current offset. This allows it to calculate the percentage completed, throughput, and estimated time of arrival (ETA) for long-running operations. It provides a real-time, user-friendly display of progress without needing to modify the original command invocation. This utility is invaluable for tasks where the native commands lack progress indicators, preventing users from waiting blindly during large file transfers or archival processes. It's an external utility, not part of coreutils, typically installed via your system's package manager.
CAVEATS
The progress command relies heavily on the Linux /proc filesystem, making it a Linux-specific utility and generally not available on other Unix-like systems. It operates by analyzing file descriptors and offsets within /proc/<PID>/fdinfo/, which may not always perfectly reflect the true progress, especially for complex operations or those involving caching.
It can only monitor processes that are accessible to the user running progress (usually requires root privileges for processes owned by other users to be fully effective). It identifies processes based on heuristics for file I/O, meaning it might not detect all types of progress (e.g., network-based transfers like wget directly to stdout, or scp where the source/destination is remote). Short-lived operations might complete before progress can attach and report. Its accuracy can also be influenced by system load and kernel optimizations. It's a "best-effort" tool designed for convenience, not guaranteed precision.
HOW IT WORKS
progress operates by scanning the /proc filesystem. For each running process, it inspects /proc/<PID>/fd/ to identify open file descriptors that correspond to regular files. It then reads /proc/<PID>/fdinfo/<FD_NUMBER> to obtain the current pos (file offset) and size (file size) for the underlying file. By comparing these values, it calculates the percentage complete, current speed, and estimated time remaining. It constantly refreshes this information to provide a real-time update.
SUPPORTED COMMANDS
progress aims to detect any running command performing significant file I/O. Commonly supported commands include: cp, mv, dd, tar, gzip, gunzip, cat (when copying), rsync (local operations), dpkg, rpm, and various archivers like zip, unzip, xz, bzip2, bunzip2. Its effectiveness depends on how the command performs its I/O and if it keeps file descriptors open predictably.
HISTORY
The progress command originated from a patch for the pv (Pipe Viewer) utility. Initially, it was known as pv -d (disk mode), which allowed pv to monitor I/O operations directly on disk without requiring data to be piped through it.
Due to its distinct functionality and different author (Andrej Zverev), it eventually branched off into a standalone project. The motivation was to provide a simple, on-demand progress indicator for common coreutils commands like cp, mv, dd, tar, and gzip, which historically lacked built-in progress displays. progress filled this crucial gap, becoming a popular choice for users who needed to estimate completion times for long-running file operations without modifying the original command syntax. Its development has focused on robustness in identifying and monitoring relevant processes via the /proc filesystem.