共計 1414 個字符,預計需要花費 4 分鐘才能閱讀完成。
自動寫代碼機器人,免費開通
這篇文章主要為大家展示了“Linux 中如何安裝使用 Progress 工具”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓丸趣 TV 小編帶領大家一起研究并學習一下“Linux 中如何安裝使用 Progress 工具”這篇文章吧。
實驗環境
Centos7.7 Minimal
Progress 工具的 github 地址:https://github.com/Xfennec/progress
安裝
Progress 工具依賴 ncurses 庫,先安裝 ncurses-devel 然后再編譯安裝 progress
[root@localhost ~]# yum -y install ncurses-devel
[root@localhost ~]# git clone https://github.com/Xfennec/progress
[root@localhost ~]# cd progress/
[root@localhost progress]# make make install
運行 progress
如果沒有命令在運行,那么 progress 程序將退出并告訴你,沒有命令正在運行。
[root@localhost ~]# progress
No command currently running: cp, mv, dd, tar, cat, rsync, grep, fgrep, egrep, cut, sort, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, adb, gzip, gunzip, bzip2, bunzip2, xz, unxz, lzma, unlzma, 7z, 7za, zcat, bzcat, lzcat, split, gpg, or wrong permissions.
使用 cp 命令復制一個文件,當拷貝一個大文件的時候可以看到進度
[root@localhost ~]# cp -p CentOS-7-x86_64-Minimal-1908.iso /tmp/
# 再打開一個終端,輸入 progress 查看任務進度
[root@localhost ~]# progress
如果需要知道移動或者復制大文件的剩余時間,可以添加 - w 選項,隱藏全部消息可以使用 -q。
[root@localhost ~]# cp -p CentOS-7-x86_64-Minimal-1908.iso /tmp/
# 再打開一個終端,輸入 progress 查看任務進度
[root@localhost ~]# progress
-wq
progress 和 watch 命令一起使用
Watch 配合 progress 命令使用,可以實時顯示文件傳輸的進度:
[root@localhost ~]# cp -p CentOS-7-x86_64-Minimal-1908.iso /tmp/
# 再打開一個終端,輸入 progress 查看任務進度
[root@localhost ~]# watch progress -wq
以上是“Linux 中如何安裝使用 Progress 工具”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注丸趣 TV 行業資訊頻道!
向 AI 問一下細節
丸趣 TV 網 – 提供最優質的資源集合!