Posts Tagged ‘wget’

How to Find Out Public IP Address via Command Line in Unix/Linux Machine

Tuesday, March 8th, 2011

If you have more than 100 servers in your network; behind a firewall; lazy to access to documentation. Here is the alternative option to find out your machine’s public IP Address via command line


$ wget -q -O - http://ipchicken.com |  grep -o -E '(^|[[:space:]])[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*([[:space:]]|$)'
# By default, FreeBSD doesn't have wget, you can use fetch instead
$ fetch -q -o - http://www.ipchicken.com | grep -o -E '(^|[[:space:]])[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*([[:space:]]|$)'

You need port 80 external/WAN access to perform the task.

How to Use Wget to Download Manual from Website

Tuesday, July 8th, 2008

Most of the time, we would prefer to read manual offline instead of browsing online, sometime we do not have internet access, and in the boredom, we can read the manual OFFLINE! Example below will show you how to grab the manual online to your machine.

Using wget to Download Website for Offline Reading

If you have wget installed on your machine, you can do the command below to download a website for offline read.


shell> wget --no-parent --mirror -p --convert-links -P ~/Documents/local-browsing http://www.some-website.com/howto/

Above command will download the entire website into your machine in your home directory Document/local-browsing. Now you can read while you are offline!