CentOS如何查看命令执行进度?
<p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei";"><strong>PV 全命为Pipe Viewer,利用它我们可以查看到命令执行的进度。</strong></p><pre class="brush:bash;toolbar:false"># wget http://www.ivarch.com/programs/sources/pv-1.5.3.tar.bz2# tar xjf pv-1.1.4.tar.bz2
# cd pv-1.1.4
# ./configure
# make && make install</pre><p style="margin: 0px; padding: 5px 0px; outline: none; font-size: 14px; line-height: 30px; font-family: tahoma, arial, "Microsoft YaHei"; 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, "Microsoft YaHei";">
例:我需要将/home/ftp/vqiu 目录下打包文件名称为vqiu@yy-mm-dd.</p><pre class="brush:bash;toolbar:false"># tar -p -cf - /home/ftp/vqiu | pv --size `du -sk /home/ftp/vqiu | cut -f 1`k | gzip >/home/ftp/vqiu@`date +%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, "Microsoft YaHei";"><br/></p>
頁:
[1]