复制文件
- 命令一: cp
time cp -a /home/learn/files /home/learn/test/cp
real 6m7.699s
user 0m0.568s
sys 0m48.372s - 命令二:tar
time (cd /home/learn/files; tar c .) | (cd /home/learn/test/tar ; tar x)
real 2m7.848s
user 0m1.209s
sys 1m12.826s - 命令三:rsync
time (cd /home/learn/files; rsync -a . /home/learn/test/rsync)
real 9m14.021s
user 4m8.799s
sys 3m10.757s - 命令四:cpio
time (cd /home/learn/files; find . -xdev) | cpio -pmd /home/learn/test/cpio
real 9m23.032s
user 0m7.435s
sys 1m35.024s - 结论
查看文件复制进度(CentOS)
先执行如下两个命令,安装progress
wget --no-check-certificate https://cbs.centos.org/kojifiles/packages/progress/0.13/1.el7/x86_64/progress-0.13-1.el7.x86_64.rpm
rpm -ivh progress-0.13-1.el7.x86_64.rpm
打开两个终端,在第一个终端执行cp等命令后,在第二个终端执行progress -M -w
即可查看cp等命令的执行进度了