像 bash 脚本中的 WGET 一样的 SCP 进度条
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18071654/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SCP Progress bar like WGET in bash script
提问by Uvais Ibrahim
I have folder named testfolder
which contain some files in it my machine. And I want copy this folder to a remote machine using scp
command as given below.
我有一个名为的文件夹testfolder
,其中包含我的机器中的一些文件。我想使用scp
下面给出的命令将此文件夹复制到远程机器。
scp -P 6969 testfolder user@remotemachine:/path/to/destination
Here I need to display a progress bar something like we get when using wget
command as given below.
在这里,我需要显示一个进度条,就像我们在使用wget
下面给出的命令时得到的一样。
[ =============48% ]
How can I implement using a bash shell script. Please advice me as I am very beginner inn shell scripting.
如何使用 bash shell 脚本来实现。请给我建议,因为我是非常初学者的旅馆 shell 脚本。
Thanks in advance.
提前致谢。