Is there a way to recover the content of /etc/hosts file?
I am new to linux (unix in general) and while exercising "tr" command from
one of my school books, I end up erasing the content of the /etc/hosts file and then I read the following note: #Do not erase the following line, or various programs # that require network functionality will fail. I use cat command to see which line my book was referring to and found that the file is empty. So, my question is how to fix this problem. Is there a way to know to recover the content of that file? How. I'm using a Mac OS X (10.5 ) Leopard on the Intel iMac. |
Stick this in there and the "various programs" should be ok.
Code:
# Do not remove the following line, or various programs |
I don't know how things are in Mac, but that file shouldn't be accessible by regular users, only the administrator account (root). Don't play around learning stuff as root, you might break something.
|
Quote:
|
empty vhosts
If you don't run a public web server or any other server services to the outside world, then an empty /etc/vhosts file will do not much harm. You will not be able to access your local Apache web server as localhost, if you have one , but that's probably all.
You have been lucky that only /etc/hosts got destroyed. Be careful. Bye, M GWN |
mis spoke... ignore
|
All times are GMT -5. The time now is 02:05 AM. |