ps ax | grep lookupd | grep -v grep | perl -ne 'split; print $_' | xargs sudo kill -HUP
I'm often connecting to different networks depending on what job I'm doing, and sometimes I'll need to tweak my
/etc/hosts file. Since my system will cache DNS lookups, I'll need to restart
lookupd, and this command does it in one hit.
Refresh DNS in Leopard
sudo dscacheutil -flushcache
Refresh DNS in Yosemite
sudo discoveryutil udnsflushcaches
MY EVENTAttend ffconf.org 2018
The UK's best JS and web development conference. 8 amazing speakers, workshops, socials — find out more & get tickets today.