To flush the DNS cache in Mac OS X 10.5 and 10.6, run this command in Terminal:
sudo dscacheutil -flushcacheTo do the same in 10.7 and 10.8, run this command:
sudo killall -HUP mDNSResponder
—
http://nerdlogger.com/category/cli/
http://hints.macworld.com/article.php?story=20120808001623238