批處理指令碼 - PING



此批處理命令透過網路傳送 ICMP/IP“回顯”資料包到指定地址。

語法

PING [address]

其中 address 是目標系統的 IP 地址或主機名。

示例

@echo off 
Ping 127.0.0.1

輸出

上述命令將向目標地址 192.168.0.1 傳送 ICMP/IP“回顯”資料包。以下是一種輸出示例。

Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes = 32 time<1ms TTL = 128
Reply from 127.0.0.1: bytes = 32 time<1ms TTL = 128
Reply from 127.0.0.1: bytes = 32 time<1ms TTL = 128
Reply from 127.0.0.1: bytes = 32 time<1ms TTL = 128

Ping statistics for 127.0.0.1:
   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
   Minimum = 0ms, Maximum = 0ms, Average = 0ms
batch_script_commands.htm
廣告