Dumping DNS cache on Leopard

30
Oct

I upgraded my Mac to Leopard yesterday and it is a beautiful operating system. My silver G5 runs fairly well, but bootup is considerably slower now. I was making some network changes today and had the need to flush my Mac’s DNS cache but had a hard time finding out how (without having to reboot, that is.)

After some frustrating searches (no, there is no lookupd command in Leopard) I finally found the answer thanks to ITToolbox.

The command is

dscacheutil -flushcache

It looks like the dscacheutil is going to be a handy utility for web developing. Woohoo!

Update: Another useful thing is how to restart remote desktop from a command line:

Remember that, too.

Update II (2008-06-14 12:42 p.m.): Another useful thing is how to restart MySQL (or other startup programs) from a command line:

sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Posted by Toby Simmons in Mac OS X in 2007 at 10:31:21 am
Tags: , , ... No comments