DNS cache reset on Mac OS

Well, this is annoying. Sometimes you just need to refresh (or clear) your local DNS cache. If you, by any chance are using a Mac OS powered machine, you’ll have to first check what version of Mac OS is running on your machine. The command was changed at least twice during the evolution of the OS

MacOS 10.7 and 10.8 :
sudo killall -HUP mDNSResponder

MacOS 10.5 and 10.6:
sudo dscacheutil -flushcache

MacOS 10.4 and earlier:
lookupd -flushcache

Missing wget on MacOS?

Yeah, I was surprised today to discover wget is not installed by default on MacOS 10.8.

Luckily the available solutions are fast and simple:

1. The faster one: use cURL ( curl -O http://www.something.org/file.txt )
2. Install wget. And for this you can either use a package manager or proced the hardcore way, which in this case is pretty easy: compile wget yourself.
– guide to compile wget: http://osxdaily.com/2012/05/22/install-wget-mac-os-x/