Skip to content

Instantly share code, notes, and snippets.

@Jachimo
Created September 7, 2017 18:13
Show Gist options
  • Save Jachimo/5e9974a5e1960ba4adff5ddc73807353 to your computer and use it in GitHub Desktop.
Save Jachimo/5e9974a5e1960ba4adff5ddc73807353 to your computer and use it in GitHub Desktop.
Mac-only commands for forcing a flush of the DNS cache
#!/usr/bin/env bash
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
logger "DNS cache manually flushed by $0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment