linux – 使用WGET从FTP服务器传输文件的问题

前端之家收集整理的这篇文章主要介绍了linux – 使用WGET从FTP服务器传输文件的问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用wget从FTP服务器获取文件.我这样做:
wget ftp://username:Password@XXX.XXX.XX.XX/public_html/images/audiothumbs/* .

下载大约1600个文件后,我收到此错误

--2010-09-07 01:36:51--  http://./
Resolving .... Failed: Name or service not known.
wget: unable to resolve host address `.'
FINISHED --2010-09-07 01:36:52--
Downloaded: 1998 files,20M in 3m 31s (95.7 KB/s)

我是否与其他服务器断开连接?

其次,如果使用no-clobber选项,如下:

wget -r -nc ftp://username:Password@XXX.XXX.XX.XX/public_html/images/audiothumbs/* .

为什么文件仍然被覆盖?

谢谢大家的帮助

解决方法

你有额外的.在命令行的末尾. wget与cp不同,不占用目标目录.因此,在从FTP服务器下载所有文件后,它会尝试从服务器下载文件(使用HTTP).

对于-nc,记录的是做一些不同于你期望的事情:

      When running Wget without -N,-nc,or -r,downloading the same file
      in the same directory will result in the original copy of file
      being preserved and the second copy being named file.1.  If that
      file is downloaded yet again,the third copy will be named file.2,and so on.  When -nc is specified,this behavior is suppressed,and
      Wget will refuse to download newer copies of file.  Therefore,‘‘"no-clobber"’’ is actually a misnomer in this mode---it’s not
      clobbering that’s prevented (as the numeric suffixes were already
      preventing clobbering),but rather the multiple version saving
      that’s prevented.

猜你在找的Linux相关文章