[英]Bash trigger wget command and don't wait for response, continue to the next command
有没有一种方法可以通过bash脚本触发wget
命令并继续执行bash脚本中的下一个命令,而无需等待wget
的响应? 我正在执行一个命令,该命令应该花费很多时间,并且不想让wget保持响应,也不要在超时已超过超时限制后重新触发它
您应该使用--background
选项,因为它会进入后台并将输出保存到日志中
--background
Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log
例:
$ wget http://cdimage.ubuntu.com/ubuntu-server/daily/current/wily-server-ppc64el.iso --background
Continuing in background, pid 79783.
Output will be written to ‘wget-log’.
$ cat wget-log
--2015-05-12 11:21:35-- http://cdimage.ubuntu.com/ubuntu-server/daily/current/wily-server-ppc64el.iso
Resolving cdimage.ubuntu.com (cdimage.ubuntu.com)... 91.189.92.164, 2001:67c:1360:8c01::1f
Connecting to cdimage.ubuntu.com (cdimage.ubuntu.com)|91.189.92.164|:80... connected.
....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.