首页 > wget 下载另存文件的问题

wget 下载另存文件的问题

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

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

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


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


-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.  
【热门文章】
【热门文章】