【问题标题】:How to get output of ping command without Ping statistics?如何在没有 Ping 统计信息的情况下获取 ping 命令的输出?
【发布时间】:2015-08-28 07:27:21
【问题描述】:

例如,在 Windows 7 的命令输出中

ping -n 1 ::1

正在关注:

Pinging ::1 with 32 bytes of data:
Reply from ::1: time<1ms

Ping statistics for ::1:
    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

是否可以在没有 Ping 统计信息的情况下获得输出(在这种情况下没有最后四行,或者在目标主机无法访问的情况下没有两行)?

【问题讨论】:

  • 你用输出做什么?
  • 用于记录主机的可达性

标签: windows command ping


【解决方案1】:

也许使用这个命令:

ping -n 1 ::1 | find "string to search"

【讨论】:

  • 是的!当然!谢谢!比预期的要好:ping -n 1 ::1|find "Reply"
猜你喜欢
  • 2021-10-15
  • 2012-03-21
  • 2021-03-16
  • 2021-10-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-01-08
  • 2023-01-27
相关资源
最近更新 更多