Showing posts with label wget. Show all posts
Showing posts with label wget. Show all posts

Monday, July 1, 2013

One liner to download Oracle JDK with wget

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u17-download-1501626.html;" http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-i586.tar.gz --no-check-certificate -O jdk-7u25-linux-i586.tar.gz

Tuesday, December 26, 2006

让 wget 忽略 robot.txt

如果想用wget来抓网页或者镜像站点但是遇到 robot.txt 不允许怎么办?比如这样的 robot.txt

User-agent: *
Disallow: /snapshots/
Disallow: /cgi-bin/
Disallow: /cgi2-bin/


在 $HOME/.wgetrc 中加入

robots = off

一切OK,镜像sina?

wget -c -m -p -q -b http://www.sina.com

-c 是继续传送, -m 是镜像, -p 是下载媒体文件,比如图片, -q 是安静模式, -b 是后台运行