Skip to content

Instantly share code, notes, and snippets.

@tavisto
Created January 20, 2014 18:12
Show Gist options
  • Save tavisto/8525649 to your computer and use it in GitHub Desktop.
Save tavisto/8525649 to your computer and use it in GitHub Desktop.
A simple script to clear dns on OSX > 10.8
#!/usr/bin/env bash
echo "Clearing Cache"
dscacheutil -flushcache
sleep 3
echo "Restarting mDNSResponder"
sudo killall -HUP mDNSResponder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment