wget ( download the whole page from the website )

---恢复内容开始---

wget -m -e robots=off -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6" "http://www.example.com"

 

去掉了robots.txt中写的不允许站外引用的君子协定。用了-U 仿造了一下request的访问格式。这样,可以避免一些网站不允许wget这样的agent来下载网站页面。

-m 是下载全部页面的意思。

如果默认网页没有robots.txt 和 其内部的只任 IE/Mozilla等的浏览器,直接用 wget -m "http://www.example.com" 就可以了。如果这里bash面用 pip,将非常爽。

 

---恢复内容结束---

 

And a little hint:

To get files from a ftp-server and execute the file :)

wget ftp://192.168.0.88/auto_LNMP.sh –ftp-user=wugk –ftp-password=123456 | sh -o-

posted @ 2013-06-27 01:58  spaceship9  阅读(418)  评论(0编辑  收藏  举报