How to show wget progress bar only?

前端 未结 9 887
情歌与酒
情歌与酒 2021-01-30 06:19

For example:

wget http://somesite.com/TheFile.jpeg

downloading: TheFile.tar.gz ...
--09:30:42--  http://somesite.com/TheFile.jpeg
                   


        
9条回答
  •  时光说笑
    2021-01-30 06:51

    You can use the follow option of tail:

    wget somesite.com/TheFile.jpeg --progress=bar:force 2>&1 | tail -f -n +6
    

    The +6 is to delete the first 6 lines. It may be different on your version of wget or your language.

    You need to use --progress=bar:force otherwise wget switches to the dot type.

    The downside is that the refreshing is less frequent than with wget (looks like every 2 seconds). The --sleep-interval option of tail seems to be meant just for that, but it didn't change anything for me.

提交回复
热议问题