Ubuntu 如何在vagrant provisioning中仅显示带有wget的进度条?
我在Ubuntu 如何在vagrant provisioning中仅显示带有wget的进度条?,ubuntu,vagrant,wget,Ubuntu,Vagrant,Wget,我在bash脚本中使用wget,当我为ubuntu机器提供vagrant时 wget https://www.example.com/test.zip -O test.zip 由于这个文件很大,我在vagrant中看到的屏幕如下: ==> default: 569600K .......... ..... ==> default: ..... .......... . ==> default: ......... ....... ==> default: ... 47%
bash脚本
中使用wget
,当我为ubuntu
机器提供vagrant
时
wget https://www.example.com/test.zip -O test.zip
由于这个文件很大,我在vagrant中看到的屏幕如下:
==> default: 569600K .......... .....
==> default: ..... .......... .
==> default: ......... .......
==> default: ... 47% 1.18M 47m34s
==> default: 569650K .......... ...
==> default: ....... .........
==> default: . .......... .....
==> default: ..... 47% 75.4K 47m34s
==> default: 569700K .......... .
==> default: ........
==> default: . .......
==> default: ... .......... ...
==> default: ....... 47% 41.9M 47m34s
==> default: 569750K .........
==> default: . .......... .....
==> default: ....
==> default: .
==> default: ...
==> default: ....... .
==> default: ......... 47% 42.8M 47m34s
==> default: 569800K .......
==> default: ... .......... ...
==> default: ....... .
==> default: ........
...
Python-3.5.0.tar.xz 7%[> ] 1013K 343KB/s
Python-3.5.0.tar.xz 11%[=> ] 1,54M 346KB/s eta 38s
Python-3.5.0.tar.xz 14%[==> ] 1,99M 316KB/s eta 38s
Python-3.5.0.tar.xz 18%[===> ] 2,59M 306KB/s eta 37s
...
这种情况每秒钟都会发生,所有重要信息都会丢失
有没有办法让我每秒只看到一个进度条而不看到其他垃圾信息。您可以做的最好的选择-使用
--无冗余
(或-nv
)选项:
这将关闭wget中所有不重要的输出(进度条)
或者使用--progress=bar:force
:
wget --progress=bar:force https://www.example.com/test.zip -O test.zip
这将使输出如下所示:
==> default: 569600K .......... .....
==> default: ..... .......... .
==> default: ......... .......
==> default: ... 47% 1.18M 47m34s
==> default: 569650K .......... ...
==> default: ....... .........
==> default: . .......... .....
==> default: ..... 47% 75.4K 47m34s
==> default: 569700K .......... .
==> default: ........
==> default: . .......
==> default: ... .......... ...
==> default: ....... 47% 41.9M 47m34s
==> default: 569750K .........
==> default: . .......... .....
==> default: ....
==> default: .
==> default: ...
==> default: ....... .
==> default: ......... 47% 42.8M 47m34s
==> default: 569800K .......
==> default: ... .......... ...
==> default: ....... .
==> default: ........
...
Python-3.5.0.tar.xz 7%[> ] 1013K 343KB/s
Python-3.5.0.tar.xz 11%[=> ] 1,54M 346KB/s eta 38s
Python-3.5.0.tar.xz 14%[==> ] 1,99M 316KB/s eta 38s
Python-3.5.0.tar.xz 18%[===> ] 2,59M 306KB/s eta 37s
...
@Sneal的可能重复-这甚至不接近重复。