我怎样才能让一个进度条(CP复制的目录)? [英] How can I make a progress bar (cp copying a directory)?

查看:167
本文介绍了我怎样才能让一个进度条(CP复制的目录)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想作为CP的进展,我可以比较文件的数字源目录中的文件的数量在目标目录,或者也许文件夹大小,而不是做呢?我试图找到例子,但所有的bash进度条似乎复制单个文件进行写操作。我想复制一堆文件(或目录,如果前者是不可能的)。

I suppose I could compare the number of files in the source directory to the number of files in the target directory as cp progresses, or perhaps do it with folder size instead? I tried to find examples, but all bash progress bars seem to be written for copying single files. I want to copy a bunch of files (or a directory, if the former is not possible).

推荐答案

您也可以使用的rsync 而不是 CP 是这样的:

You can also use rsync instead of cp like this:

rsync的-Pa源目标

这将给你一个进度条和完成的估计时间。非常方便。

Which will give you a progress bar and estimated time of completion. Very handy.

有的更多关于它的信息在这里

这篇关于我怎样才能让一个进度条(CP复制的目录)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆