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

 不懂珍惜的林记热_713 发布于 2022-10-25 07:58

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

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

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

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

    2022-10-26 14:36 回答
  • -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.  
    2022-10-26 14:37 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有