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-06-20 11:56
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » What does "ping -n 1 127.1 > nul" mean? View 18,257 Replies 73
Floor 61 Posted 2007-12-02 19:43 ·  中国 江苏 南京 电信
初级用户
Credits 54
Posts 22
Joined 2007-02-10 02:42
19-year member
UID 79107
Gender Male
Status Offline
Using ping -n 1 127.1>nul is used for delaying!! Generally, for batch processing that involves loops, a high execution frequency is not needed. Often, 5 - 10 seconds is sufficient. But if you don't add a delay, continuously executing some commands will consume a lot of CPU resources. Seek a balance!
Floor 62 Posted 2007-12-03 16:27 ·  中国 河北 唐山 电信
新手上路
Credits 9
Posts 5
Joined 2007-05-05 00:31
19-year member
UID 87506
Gender Male
Status Offline
Floor 63 Posted 2007-12-22 00:26 ·  中国 浙江 杭州 电信
新手上路
Credits 16
Posts 8
Joined 2007-12-21 19:58
18-year member
UID 106401
Gender Male
Status Offline
I like this explanation method and then practice it by myself
Floor 64 Posted 2008-01-06 17:36 ·  中国 天津 电信
初级用户
Credits 22
Posts 10
Joined 2008-01-01 17:31
18-year member
UID 107408
Gender Male
Status Offline
Learning
Floor 65 Posted 2008-02-14 20:17 ·  中国 河南 焦作 联通
初级用户
Credits 25
Posts 13
Joined 2007-03-17 11:26
19-year member
UID 82064
Gender Male
Status Offline
Learned to use nul, haha.
Floor 66 Posted 2008-02-15 20:23 ·  中国 云南 玉溪 电信
新手上路
Credits 3
Posts 2
Joined 2008-02-14 14:48
18-year member
UID 110636
Gender Male
Status Offline
Floor 67 Posted 2008-03-05 16:54 ·  中国 北京 阿里云BGP数据中心
初级用户
Credits 64
Posts 37
Joined 2007-03-14 03:38
19-year member
UID 81659
Gender Male
Status Offline
Got it, thank you very much
Floor 68 Posted 2008-03-14 17:10 ·  中国 四川 泸州 电信
初级用户
Credits 54
Posts 27
Joined 2006-12-02 11:46
19-year member
UID 72370
Gender Male
Status Offline
Floor 69 Posted 2008-03-15 00:59 ·  中国 上海 浦东新区 电信
初级用户
★★
Credits 177
Posts 85
Joined 2007-12-01 20:40
18-year member
UID 104378
Gender Male
Status Offline
Is `nul` an internal parameter?
Why does it appear in various versions of DOS?
Is it similar to `NULL` in C&C++?
Floor 70 Posted 2008-03-15 01:01 ·  中国 上海 浦东新区 电信
初级用户
★★
Credits 177
Posts 85
Joined 2007-12-01 20:40
18-year member
UID 104378
Gender Male
Status Offline
By the way, I also have a relatively basic question.

Is the principle of DELAY.EXE the same as or exactly doing the same thing as ping -n 1 127.1>nul?
Floor 71 Posted 2008-03-15 01:11 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline
1、nul is not a parameter, but a device name under DOS/Windows, indicating an empty device, which has nothing, and can be understood as a black hole in the universe.

2、The principle of Delay.exe is definitely not achieved by pinging. If you want to know the principle, you can disassemble Delay.exe to look at its disassembly code for analysis.
Floor 72 Posted 2008-03-18 03:35 ·  中国 上海 浦东新区 电信
初级用户
★★
Credits 177
Posts 85
Joined 2007-12-01 20:40
18-year member
UID 104378
Gender Male
Status Offline
Originally posted by lxmxn at 2008-3-15 01:11 AM:
1、nul is not a parameter, but a device name under DOS/Windows, representing the null device, which has nothing, and can be understood as a black hole in the universe.

2、The principle of Delay.exe is definitely not achieved by pinging...

thank you for your answer.
Floor 73 Posted 2008-03-24 23:45 ·  中国 福建 泉州 联通
新手上路
Credits 2
Posts 1
Joined 2008-03-24 21:20
18-year member
UID 113905
Gender Male
Status Offline
The people here are very enthusiastic... Haha

Thanks! Learned it!! Very grateful!!!
Floor 74 Posted 2008-12-10 11:11 ·  中国 广东 深圳 联通
新手上路
Credits 1
Posts 1
Joined 2008-11-21 17:37
17-year member
UID 131686
Gender Male
Status Offline
Indeed, I have learned a lot, but it's better to focus on practical work applications!
‹ Prev 1 3 4 5
Forum Jump: