首頁  >  問答  >  主體

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 天前694

全部回覆(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
  • 取消回覆