Reputation: 191
I've entered the following into the hosts file
127.0.0.1 www.facebook.com
127.0.0.2 www.youtube.com
how can I delete the above entries from the file using cmd?
Upvotes: 0
Views: 2129
Reputation:
An ugly solution:
find /v "facebook" hosts | find /v "youtube" hosts > hosts
/V Displays all lines NOT containing the specified string.
see the documentation for find (ss64) system utility
Upvotes: 3