Linux command
progress 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show progress of running coreutils commands
progress
Monitor continuously
progress -M
Wait for processes to finish
progress -w
Monitor specific command
progress -c [cp]
Monitor specific PID
progress -p [12345]
Update every N seconds
progress -i [1]
Show only specific process
progress -p $(pidof [dd])
说明
progress (formerly cv - coreutils viewer) shows the progress of running coreutils commands. It displays file operations progress for cp, mv, dd, tar, gzip, and similar tools that don't have built-in progress indicators. The tool works by reading /proc filesystem to find file descriptors and position information. It calculates progress by comparing current position to total file size, then displays percentage and throughput. Supported commands include: cp, mv, dd, tar, cat, rsync, gzip, gunzip, bzip2, xz, lzma, and many others. The -a flag adds custom commands to monitor. Monitor mode (-M) continuously updates the display like top. Wait mode (-w) blocks until all monitored processes complete - useful in scripts to know when operations finish. For dd specifically, progress provides the ETA and throughput that dd traditionally lacked (before dd's native status=progress option).
参数
- -M, --monitor
- Continuous monitoring mode.
- -w, --wait
- Wait for processes to complete.
- -c _CMD_, --command _CMD_
- Monitor only specified command.
- -p _PID_, --pid _PID_
- Monitor specific PID.
- -i _SEC_, --interval _SEC_
- Update interval in seconds.
- -a, --additional-command _CMD_
- Add custom command to monitor.
- -o, --open-mode
- Monitor all open files (experimental).
- -q, --quiet
- Quieter output.
- -v, --version
- Show version.
- -h, --help
- Show help.
FAQ
What is the progress command used for?
progress (formerly cv - coreutils viewer) shows the progress of running coreutils commands. It displays file operations progress for cp, mv, dd, tar, gzip, and similar tools that don't have built-in progress indicators. The tool works by reading /proc filesystem to find file descriptors and position information. It calculates progress by comparing current position to total file size, then displays percentage and throughput. Supported commands include: cp, mv, dd, tar, cat, rsync, gzip, gunzip, bzip2, xz, lzma, and many others. The -a flag adds custom commands to monitor. Monitor mode (-M) continuously updates the display like top. Wait mode (-w) blocks until all monitored processes complete - useful in scripts to know when operations finish. For dd specifically, progress provides the ETA and throughput that dd traditionally lacked (before dd's native status=progress option).
How do I run a basic progress example?
Run `progress` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -M, --monitor do in progress?
Continuous monitoring mode.