wget 指定本定文件夹和保存为特定名称

来源:互联网 发布:阿基米德软件下载 编辑:程序博客网 时间:2024/06/05 05:36

1. 在shell 中执行以下命令

[plain] view plain copy
  1. wget -P /root/test "http://www.baidu.com/index.html"  

会把 index.html 文件保存到 "/root/test" 目录下. 


2. 执行

[plain] view plain copy
  1. wget -O "baidu.html" "http://www.baidu.com/index.html"  

会把 index.hmtl 保存到当前目录, 命令为 "baidu.html".


3. 执行

[plain] view plain copy
  1. wget -P /root/test -O "baidu.html" "http://www.baidu.com/index.html"  

的结果和 2 相同, 并不会保存到 "/root/test" 目录下.
阅读全文
0 0
原创粉丝点击