当前位置: 首页 > 工具软件 > GNU Wget > 使用案例 >

Linux:wget 后台下载

文增
2023-12-01

前言

  • centos8

wget 命令

wget --help
GNU Wget 1.14, a non-interactive network retriever.
Usage: wget [OPTION]... [URL]...

Mandatory arguments to long options are mandatory for short options too.

Startup:
  -V,  --version           display the version of Wget and exit.
  -h,  --help              print this help.
  -b,  --background        go to background after startup.
  -e,  --execute=COMMAND   execute a `.wgetrc'-style command.
  
...  

wget 下载

shell> wget https://download.filezilla-project.org/client/FileZilla_3.60.2_win64_sponsored-setup.exe
  • 不可退出控制台,如果退出控制台会中断下载

wget 后台下载

shell> wget -b https://download.filezilla-project.org/client/FileZilla_3.60.2_win64_sponsored-setup.exe
Continuing in background, pid 24022.
Output will be written to ‘wget-log.2’.
  • 下载任务在后台运行
  • 可退出控制台,如果退出控制台不会中断下载
  • 此时,wget 会将输出信息写入到 wget-log.2(此文件由wget自动生成。可通过 -o 修改此文件名称) 文件中
  • 查看wget进度:tail -f wget-log.2
 类似资料: