Last active
February 3, 2016 22:51
-
-
Save jssjr/5a38f4ec05da22889c5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case "$(sw_vers -productVersion)" in | |
10.5.*|10.6.*) | |
alias flush_dns="sudo dscacheutil -flushcache" | |
;; | |
10.8.*|10.7.*) | |
alias flush_dns="sudo killall -HUP mDNSResponder" | |
;; | |
10.9.*) | |
alias flush_dns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" | |
;; | |
10.10.[123]) | |
alias flush_dns="sudo discoveryutil udnsflushcaches" | |
;; | |
10.10.*) | |
alias flush_dns="sudo killall -HUP mDNSResponder" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lazy approach?