首页  >  问答  >  正文

ubuntu - wget 下载另存文件的问题

我的目的是:下载并另存一个全新的文件名;
如以下:

wget http://icons.iconarchive.com/icons/benjigarner/glassy-software/256/Azureus-icon.png -o icon.png

但是我却得到两个文件名:Azureus-icon.png 与 icon.png;
我的需求是只是希望得到一个全新的文件 icon.png。

高洛峰高洛峰2735 天前697

全部回复(2)我来回复

  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:10:58

    -o换成-O就好了。

    wget http://icons.iconarchive.com/icons/benjigarner/glassy-software/256/Azureus-icon.png -O icon.png

    可以看看man wget的说明:

    大写O:

     -O file
           --output-document=file
               The documents will not be written to the appropriate files, but all will be concatenated together and written to file. 

    小写o:

    -o logfile
           --output-file=logfile
               Log all messages to logfile.  

    回复
    0
  • 阿神

    阿神2017-04-24 09:10:58

    好像是 -O 吧,大写的O ,不太确定,你试一下,我现在在windows 下没法帮你试

    回复
    0
  • 取消回复