一代村夫 發表於 2024-8-19 00:00:00

CentOS如何查看命令执行进度?

<p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, &quot;Microsoft YaHei&quot;;"><strong>PV 全命为Pipe Viewer,利用它我们可以查看到命令执行的进度。</strong></p><pre class="brush:bash;toolbar:false">#&nbsp;wget&nbsp;http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2
#&nbsp;tar&nbsp;xjf&nbsp;pv-1.1.4.tar.bz2
#&nbsp;cd&nbsp;pv-1.1.4
#&nbsp;./configure
#&nbsp;make&nbsp;&amp;&amp;&nbsp;make&nbsp;install</pre><p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, &quot;Microsoft YaHei&quot;; text-align: center;"><img style="max-width:100%!important;height:auto!important;" title="CentOS如何查看命令执行进度?" alt="CentOS如何查看命令执行进度?" src="https://zhuji.jb51.net/uploads/img/202305/d5eff70db6a1a8da02818e5fa0d1b711.jpg"/></p><p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, &quot;Microsoft YaHei&quot;;">
        例:我需要将/home/ftp/vqiu 目录下打包文件名称为vqiu@yy-mm-dd.</p><pre class="brush:bash;toolbar:false">#&nbsp;tar&nbsp;-p&nbsp;-cf&nbsp;-&nbsp;/home/ftp/vqiu&nbsp;|&nbsp;pv&nbsp;--size&nbsp;`du&nbsp;-sk&nbsp;/home/ftp/vqiu&nbsp;|&nbsp;cut&nbsp;-f&nbsp;1`k&nbsp;|&nbsp;gzip&nbsp;&gt;/home/ftp/vqiu@`date&nbsp;+%y-%m-%d`.tar.g</pre><p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, &quot;Microsoft YaHei&quot;;"><br/></p>
頁: [1]
查看完整版本: CentOS如何查看命令执行进度?