Board logo

标题: [网络连接] 是不是很幼稚啊,如何生成Hosts [打印本页]

作者: yangshw1990    时间: 2011-9-12 12:35     标题: 是不是很幼稚啊,如何生成Hosts

  1. @echo off
  2. echo # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.              >>E:\Study\CMD\1.txt
  3. echo #
  4. echo # This file contains the mappings of IP addresses to host names. Each   >>E:\Study\CMD\1.txt
  5. echo # entry should be kept on an individual line. The IP address should   >>E:\Study\CMD\1.txt
  6. echo # be placed in the first column followed by the corresponding host name.   >>E:\Study\CMD\1.txt
  7. echo # The IP address and the host name should be separated by at least one   >>E:\Study\CMD\1.txt
  8. echo # space.   >>E:\Study\CMD\1.txt
  9. echo #   >>E:\Study\CMD\1.txt
  10. echo # Additionally, comments (such as these) may be inserted on individual   >>E:\Study\CMD\1.txt
  11. echo # lines or following the machine name denoted by a '#' symbol.   >>E:\Study\CMD\1.txt
  12. echo # 该文件为yangshw1990提供   >>E:\Study\CMD\1.txt
  13. echo # For example:   >>E:\Study\CMD\1.txt
  14. echo #   >>E:\Study\CMD\1.txt
  15. echo #      102.54.94.97     rhino.acme.com          # source server   >>E:\Study\CMD\1.txt
  16. echo #       38.25.63.10     x.acme.com              # x client host   >>E:\Study\CMD\1.txt
  17. echo 127.0.0.1 localhost              >>E:\Study\CMD\1.txt
  18. exit
复制代码
是不是很幼稚啊?!?!?!
作者: kejitong    时间: 2011-9-12 17:41

看不懂,能不能给解释下。最好能详细点
作者: bingxing8000    时间: 2011-9-13 09:49

  1. @echo off
  2. (echo # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
  3. echo #
  4. echo # This file contains the mappings of IP addresses to host names. Each   
  5. echo # entry should be kept on an individual line. The IP address should
  6. echo # be placed in the first column followed by the corresponding host name.  
  7. echo # The IP address and the host name should be separated by at least one
  8. echo # space.
  9. echo #
  10. echo # Additionally, comments ^(such as these^) may be inserted on individual
  11. echo # lines or following the machine name denoted by a '#' symbol.
  12. echo # For example:
  13. echo #
  14. echo #      102.54.94.97     rhino.acme.com          # source server
  15. echo #       38.25.63.10     x.acme.com              # x client host
  16. echo 127.0.0.1 localhost ) >>E:\1.txt
复制代码

作者: CrLf    时间: 2011-9-13 11:21

建议用 more




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2