【问题标题】:Specifying local directory with WGET使用 WGET 指定本地目录
【发布时间】:2012-12-24 02:19:05
【问题描述】:

我有一个关于 wget 的问题,我似乎无法弄清楚。

我正在使用以下命令下载我的 FTP 服务器的全部内容(工作正常)

wget -m -P c:\ ftp://user:password@xxx.xxx.xxx.xxx

问题在于,这会在 c:\ 中创建一个名为 'xxx.xxx.xxx.xxx' 的文件夹,并将整个 FTP 服务器内容放在此目录中。

我不希望它创建这个目录,只是把整个 FTP 目录结构直接放在 c:\ 中

如何使用 wget 指定?

提前谢谢你!

【问题讨论】:

    标签: download directory local wget


    【解决方案1】:
    -P prefix
    --directory-prefix=prefix
    Set directory prefix to prefix. The directory prefix is the directory where all other files and subdirectories will be saved to, i.e. the top of the retrieval tree. The default is . (the current directory)
    

    http://linux.die.net/man/1/wget

    【讨论】:

    • 您好 cggaurav,感谢您的回复。是的,我已阅读此内容,但我仍然无法停止使用 IP 地址创建文件夹。我希望它直接将FTP目录下载到C的根目录:\
    【解决方案2】:

    使用-nH (--no-host-directories)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-09
      • 1970-01-01
      • 1970-01-01
      • 2019-05-30
      • 2012-06-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多