How to show wget progress bar only?

前端 未结 9 905
情歌与酒
情歌与酒 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:52

    Use using these flags:

    wget  -q --show-progress --progress=bar:force 2>&1
    
    0 讨论(0)
  • 2021-01-30 06:54

    The option --show-progress, as pointed out by others, is the best option, but it is available only since GNU wget 1.16, see Noteworthy changes in wget 1.16.

    To be safe, we can first check if --show-progress is supported:

    # set progress option accordingly
    wget --help | grep -q '\--show-progress' && \
      _PROGRESS_OPT="-q --show-progress" || _PROGRESS_OPT=""
    
    wget $_PROGRESS_OPT ...
    

    Maybe it's time to consider just using curl.

    0 讨论(0)
  • 2021-01-30 07:03

    Use:

    wget http://somesite.com/TheFile.jpeg -q --show-progress
    
    • -q: Turn off wget's output

    • --show-progress: Force wget to display the progress bar no matter what its verbosity level is set to

    0 讨论(0)
提交回复
热议问题