As the world increasingly embraces open-source software, Linux has become a favorite among many tech enthusiasts. Its flexibility, security, and extensive customization options have made it a go-to for developers and system administrators alike. One of the many strengths of Linux lies in its robust command-line interface (CLI) that can be augmented with a variety of utilities. Today, we delve into the world of one such utility that enhances the CLI experience - Progress, formerly known as cv (Coreutils Viewer).
Table of Contents
What is Progress?
Progress is a tiny yet powerful tool designed to monitor and display the progress of coreutils basic commands (cp, mv, dd, tar, gzip, gunzip, cat, etc.) currently running on your system.
Progress displays the percentage of copied data, and can even estimate the time and throughput. For users seeking constant monitoring, it also provides a 'top-like' mode.
The Progress tool is an open-source, free application developed using the C programming language. It is designed to be compatible with multiple platforms, including Linux, FreeBSD, and macOS.
How Does Progress Work?
Progress operates by scanning /proc for interesting commands. It then inspects directories fd and fdinfo to find opened files and seek positions, subsequently reporting the status for the largest file. On macOS, it performs the same operations using libproc.
Despite its extensive capabilities, progress is very light and compatible with virtually any command.
Installing Progress
The installation process for Progress is straightforward and depends on the type of system you're using.
For Debian-based systems (Debian, Ubuntu, Mint, etc.), open a terminal and run:
$ sudo apt install progress
If you're using Arch Linux, EndeavourOS and Manjaro Linux, open a terminal and execute:
$ sudo pacman -S progress
Fedora users can install progress by opening a terminal and typing:
$ sudo dnf install progress
For openSUSE, open a terminal and enter:
$ sudo zypper install progress
On macOS with Homebrew, open a terminal and run:
$ brew install progress
If you prefer MacPorts on macOS, open a terminal and type:
$ sudo port install progress
Building from Source
For those who prefer building from the source, the process is simple.
Ensure that you have the necessary build tools and libraries installed on your system. Refer the following link to install development tools.
How To Install Development Tools In Linux
Next, download the source code for progress:
$ git clone https://github.com/Xfennec/progress.git
Navigate to the directory where the source code is clone.
$ cd progress
Run the following command to compile and install progress:
$ make && sudo make install
If you're using FreeBSD, use 'gmake' instead of 'make'.
If you encounter any errors related to missing ncurses library while building from source, you need to install Ncurses in your Linux system.
Depending on your distribution, use the appropriate package manager to install the necessary ncurses packages. For example:
For Debian-based systems, use:
$ sudo apt install libncurses5-dev
For Arch Linux, use:
$ sudo pacman -S ncurses
For Fedora, use:
$ sudo dnf install ncurses-devel
Leveraging the Power of Progress
Progress can be used in a myriad of ways to monitor your system. Let me show you a few examples.
1. Monitoring Coreutils Commands
To monitor all current and upcoming instances of coreutils commands in a simple window, enter the following command:
$ watch progress -q
2. Monitoring Download Progress
To monitor the progress of your downloads while using Firefox, execute the following command:
$ watch progress -wc firefox
3. Monitoring Web Server Activity
To keep an eye on your web server activity, type the following command:
$ progress -c httpd
4. Monitoring Heavy Commands
We can launch and monitor any heavy command using $!. Take a look at the following example.
$ cp bigfile newfile & progress -mp $!
Let us break down the above command and see what each option does.
- cp bigfile newfile &: This command copies a file named bigfile to a new file named newfile. The ampersand & at the end runs the command in the background, allowing the user to continue to use the shell without waiting for the command to complete.
- progress -mp $!: This command uses the progress utility to monitor the progress of the most recent background process. Here is what the flags do:
- -m enables monitor mode, which refreshes the progress stats in real time until the tracked process finishes.
- -p tells progress to monitor the specific process ID (PID).
- $! is a special shell variable that holds the PID of the most recently executed background process.
So, to summarize, the whole command is copying a file in the background and simultaneously monitoring the progress of this copy operation using the progress utility.
The possibilities with Progress are extensive and can be tailored to fit your needs.
Related Read:
- Advanced Copy – Add Progress Bar To cp And mv Commands In Linux
- How To Monitor The Progress Of Data Through A Pipe Using ‘pv’ Command
Conclusion
The Progress utility is an useful tool that provides a straightforward and efficient way to monitor various processes and activities on your system. Whether you need to track the progress of downloads, monitor web server activity, observe the execution of heavy commands, or keep an eye on coreutils commands, Progress offers a range of functionalities to suit your needs.
By offering valuable insights into command execution, Progress aids in system monitoring and performance evaluation. If you are a developer, system administrator, or simply a tech enthusiast looking to leverage the power of command-line utilities, Progress can be a significant addition to your toolkit.
As with any tool, the best way to truly appreciate its capabilities is by using it. So, give Progress a try, and discover a new level of command-line efficiency.
Resource:
- Progress GitHub Repository
以上是Coreutils進度查看器:用於實時監視Coreutils命令的強大工具的詳細內容。更多資訊請關注PHP中文網其他相關文章!

Linux操作系統的核心是其命令行界面,通過命令行可以執行各種操作。 1.文件和目錄操作使用ls、cd、mkdir、rm等命令管理文件和目錄。 2.用戶和權限管理通過useradd、passwd、chmod等命令確保系統安全和資源分配。 3.進程管理使用ps、kill等命令監控和控制系統進程。 4.網絡操作包括ping、ifconfig、ssh等命令配置和管理網絡連接。 5.系統監控和維護通過top、df、du等命令了解系統運行狀態和資源使用情況。

介紹 Linux是一個強大的操作系統,由於其靈活性和效率,開發人員,系統管理員和電源用戶都喜歡。但是,經常使用長而復雜的命令可能是乏味的

Linux適用於服務器、開發環境和嵌入式系統。 1.作為服務器操作系統,Linux穩定高效,常用於部署高並發應用。 2.作為開發環境,Linux提供高效的命令行工具和包管理系統,提升開發效率。 3.在嵌入式系統中,Linux輕量且可定制,適合資源有限的環境。

簡介:通過基於Linux的道德黑客攻擊數字邊界 在我們越來越相互聯繫的世界中,網絡安全至關重要。 道德黑客入侵和滲透測試對於主動識別和減輕脆弱性至關重要

Linux基礎學習從零開始的方法包括:1.了解文件系統和命令行界面,2.掌握基本命令如ls、cd、mkdir,3.學習文件操作,如創建和編輯文件,4.探索高級用法如管道和grep命令,5.掌握調試技巧和性能優化,6.通過實踐和探索不斷提陞技能。

Linux在服務器、嵌入式系統和桌面環境中的應用廣泛。 1)在服務器領域,Linux因其穩定性和安全性成為託管網站、數據庫和應用的理想選擇。 2)在嵌入式系統中,Linux因其高度定制性和高效性而受歡迎。 3)在桌面環境中,Linux提供了多種桌面環境,滿足不同用戶需求。

Linux的缺點包括用戶體驗、軟件兼容性、硬件支持和學習曲線。 1.用戶體驗不如Windows或macOS友好,依賴命令行界面。 2.軟件兼容性不如其他系統,缺乏許多商業軟件的原生版本。 3.硬件支持不如Windows全面,可能需要手動編譯驅動程序。 4.學習曲線較陡峭,掌握命令行操作需要時間和耐心。

Linuxisnothardtolearn,butthedifficultydependsonyourbackgroundandgoals.ForthosewithOSexperience,especiallycommand-linefamiliarity,Linuxisaneasytransition.Beginnersmayfaceasteeperlearningcurvebutcanmanagewithproperresources.Linux'sopen-sourcenature,bas


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)