China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-10 16:00
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » What does "ping -n 2 127.1>nul" mean View 1,783 Replies 4
Original Poster Posted 2006-12-06 09:53 ·  中国 广东 深圳 宝安区 电信
新手上路
Credits 2
Posts 1
Joined 2006-12-06 09:26
19-year member
UID 72728
Gender Male
Status Offline
I see that many experts' batch scripts have such a line:
ping -n 2 127.1>nul
I don't understand!!
I'm a newbie, and please各位 experts teach me what it means, please!!
Excuse me!!


──────────────── Moderation Record ────────────────
Performed by: namejm
Original title: Noob
Modified title: What does ping -n 2 127.1>nul mean
Explanation: Because the original title was too vague, which was not convenient for forum search and management. Three days after this notice was posted,
  the original poster had not changed the title. Now I forcefully modify the title and deduct 2 points from the original poster's points.
──────────────── Moderation Record ────────────────


[ Last edited by HAT on 2008-11-20 at 11:51 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
namejm -2 2007-01-06 11:10
Floor 2 Posted 2006-12-06 10:16 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
You can achieve the purpose of delay by pinging the local IP.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 3 Posted 2006-12-07 03:47 ·  中国 河南 郑州 电信
中级用户
★★
Credits 439
Posts 170
Joined 2006-01-09 20:29
20-year member
UID 48707
Status Offline
ping -n 2 127.1>nul

is equivalent to

ping -n 2 127.0.0.1 >nul

-n counts

2 two times

127.0.0.1 local IP

>nul null
bat c c++
Floor 4 Posted 2007-03-14 11:22 ·  中国 江苏 苏州 电信
初级用户
Credits 88
Posts 41
Joined 2006-05-13 21:57
20-year member
UID 55479
Status Offline
The explanation is very clear, thank you.
a9319751
Intermediate User
Floor 5 Posted 2008-11-20 11:50 ·  中国 湖北 武汉 电信
新手上路
Credits 7
Posts 6
Joined 2008-11-19 05:43
17-year member
UID 131409
Gender Male
Status Offline
Forum Jump: