I've been doing some web development, and decided to use my MacBook Pro. I've never really used OSX for any kind of development. I usually use a Linux box when performing web development. Because I'm using Apache with virtual hosts. I was in a situation where I needed to remove my development entry for the virtual hosts from /etc/hosts
. Removing the entry went without a hitch, but it was when I added the entry back into the hosts file that I encountered the problem. A google search yielded a few solutions none of which worked for me, but the command below worked perfectly!
sudo lookupd -flushcache