0

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?

Ross Ridge
  • 37,034
  • 7
  • 72
  • 110
jNerd
  • 189
  • 3
  • 11

1 Answers1

3

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