linux - wget附加已经下载的文件并跳过完成

标签 linux download wget

我试图让 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/

相关文章:

linux - 如何测试 TCP 写入超时的处理?

javascript - 下载的文件会保存两次吗?

objective-c - 当应用程序未激活时 iOS 后台下载

php - 如何使用 IMAP 和 PHP 为网络邮件制作附件下载链接?

html - 如何下载包含在线文件/文件夹列表中的所有文件和子目录的 HTTP 目录?

c++ - 用于文件/运行时权限的 Unix/Linux API

linux - 我正在用卡尺对 Hadoop 进行基准测试。卡尺基准测试目标系统架构

python - 如何使用 Selenium 下载此视频

linux - Linux TCP/IP 黑客 'live' 在哪里?

android - 从 adb shell 获取