Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已在主机文件中输入以下内容, 127.0.0.1 www.facebook.com 127.0.0.2 www.youtube.com 如何使用 cmd 从文件中删除上述条目?
127.0.0.1 www.facebook.com 127.0.0.2 www.youtube.com
一个丑陋的解决方案:
find /v "facebook" hosts | find /v "youtube" hosts > hosts
/V 显示所有不包含指定字符串的行。
请参阅find ( ss64 ) 系统实用程序的文档