Created
February 27, 2012 16:13
-
-
Save joeyblake/1925033 to your computer and use it in GitHub Desktop.
Shell script for cleaning/resetting /etc/hosts files messed up by MAMP Pro
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
#!/bin/bash | |
# copy this file to /usr/sbin | |
# if you have other hosts entries that you would not like to lose, make sure they get added to the hosts.mamp.bak file | |
cat /etc/hosts.mamp.bak > /etc/hosts | |
echo 'clean!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One line install
Open up your terminal and run this command
curl https://raw.github.com/gist/1925033/88a479a363b211253d0444fe7d4e2cf5afcc6f75/hostfix > /usr/sbin/hostfix && chmod a+x /usr/sbin/hostfix
Usage
This will need to be run as sudo
sudo hostfix