wget 命令下载文件并另存为不同的文件名 [英] wget command to download a file and save as a different filename
本文介绍了wget 命令下载文件并另存为不同的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 wget
命令下载文件.但是当它下载到我的本地机器时,我希望它被保存为不同的文件名.
I am downloading a file using the wget
command. But when it downloads to my local machine, I want it to be saved as a different filename.
例如:我正在从 www.examplesite.com/textfile.txt
我想使用 wget
将文件 textfile.txt
在我的本地目录中保存为 newfile.txt
.我使用 wget
命令如下:
I want to use wget
to save the file textfile.txt
on my local directory as newfile.txt
. I am using the wget
command as follows:
wget www.examplesite.com/textfile.txt
推荐答案
使用 -O 文件
选项.
例如
wget google.com
...
16:07:52 (538.47 MB/s) - `index.html' saved [10728]
对比
wget -O foo.html google.com
...
16:08:00 (1.57 MB/s) - `foo.html' saved [10728]
这篇关于wget 命令下载文件并另存为不同的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文