我试图让 wget 从网络服务器下载所有内容,它似乎进展顺利,但我当前正在下载的服务器存在问题,磁盘空间不足,因此停止。
我正在寻找一种让 wget 下载所有网站内容的方法,如果它找到一个已经处理过的文件,则检查它是否小于网络服务器上的文件,如果它继续中断下载或者更糟的是重新下载它。如果文件确实存在并且大小相同,则移至下一个
我正在使用
wget -r --no-parent -N http://www.website.com
最佳答案
检查man wget
中的--continue
(或-c
)选项。手册页甚至显示了此选项用于递归下载。
来自手册页:
-c
--continue
Continue getting a partially-downloaded file. This is useful
when you want to finish up a download started by a previous
instance of Wget, or by another program. For instance:
wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z
If there is a file named ls-lR.Z in the current directory,
Wget will assume that it is the first portion of the remote
file, and will ask the server to continue the retrieval from
an offset equal to the length of the local file.
并且,显示 -r
和 -c
一起使用:
You may put several options that do not require arguments together, like:
wget -drc <URL>
This is completely equivalent to:
wget -d -r -c <URL>
-Rich Alloway (RogueWave)
关于linux - wget附加已经下载的文件并跳过完成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42111916/