中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-10 23:53
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [已结]输出重定向问题:为何arp的帮助无法输出到文件? 查看 860 回复 10
楼 主 [已结]输出重定向问题:为何arp的帮助无法输出到文件? 发表于 2008-12-10 16:02 ·  中国 山西 长治 联通
新手上路
积分 15
发帖 8
注册 2008-12-09 11:38
17年会员
UID 133302
性别 男
状态 离线
我在学习dos的命令时,在用>和>>将dos中的一些命令的说明输出到一个文件中,一般的命令都可以输出到文件中,但是arp却怎么也不行,请各位大侠帮忙。运行结果如下:

C:\>tracert /? >> d:\file1

C:\>arp /? >> d:\file1

Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).

ARP -s inet_addr eth_addr
ARP -d inet_addr
ARP -a

-a Displays current ARP entries by interrogating the current
protocol data. If inet_addr is specified, the IP and Physical
addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP
table are displayed.
-g Same as -a.
-v Displays current ARP entries in verbose mode. All invalid
entries and entries on the loop-back interface will be shown.
inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface specified
by if_addr.
-d Deletes the host specified by inet_addr. inet_addr may be
wildcarded with * to delete all hosts.
-s Adds the host and associates the Internet address inet_addr
with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be modified.
If not present, the first applicable interface will be used.
Example:
> arp -s 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.

C:\>


───────────────── 版务记录 ─────────────────
执行:HAT
操作:在帖子标题中增加搜索关键字
说明:原标题"输出重定向问题"不利于论坛搜索
处罚:扣除2点积分
提示:建议阅读以下帖子
{1415}提问的智慧
{7326}论坛新手必读,所有人的基本行为准则
{22703}请不要做浮躁的人
{32667}那些连标题都写不清楚的人们啊,你们醒醒吧
{32825}本版严厉整顿烂帖
───────────────── 版务记录 ─────────────────


[ Last edited by HAT on 2008-12-16 at 18:17 ]
2 发表于 2008-12-10 16:18 ·  中国 北京 海淀区 联通
高级用户
★★
积分 652
发帖 193
注册 2005-09-25 00:00
20年会员
UID 42822
状态 离线
真奇怪,连|MORE也不支持
ディスケット オペレーティン グシステム
3 发表于 2008-12-10 18:21 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
arp /? 2>d:\file1
4 发表于 2008-12-11 09:39 ·  中国 山西 长治 联通
新手上路
积分 15
发帖 8
注册 2008-12-09 11:38
17年会员
UID 133302
性别 男
状态 离线
谢谢,非常感谢HAT,加了个2是什么意思,能否讲一下,如果没有时间,可以发个E-mail给我,344790547@qq.com
5 发表于 2008-12-11 09:48 ·  中国 山西 长治 联通
新手上路
积分 15
发帖 8
注册 2008-12-09 11:38
17年会员
UID 133302
性别 男
状态 离线
2楼的大侠,more 可以。
C:\>more /? >>d:\file1

C:\>
6 Re 4楼 发表于 2008-12-11 11:26 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
2表示标准出错信息,具体内容可到批处理室搜索“句柄”、“重定向”等。
7 Re 5楼 发表于 2008-12-11 11:27 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
2楼的意思是无法通过管道传递给more
arp /?|more
8 发表于 2008-12-12 10:08 ·  中国 黑龙江 牡丹江 电信
新手上路
积分 8
发帖 4
注册 2008-03-10 09:27
18年会员
UID 112505
性别 男
状态 离线
加2是什么意思,能说明一下吗
9 Re 8楼 发表于 2008-12-12 14:04 ·  美国 惠普HP
版主
★★★★★
积分 9,023
发帖 5,017
注册 2007-05-31 19:39
19年会员
UID 89899
性别 男
状态 离线
请参考6楼回复
10 发表于 2008-12-15 23:46 ·  中国 山西 长治 联通
新手上路
积分 15
发帖 8
注册 2008-12-09 11:38
17年会员
UID 133302
性别 男
状态 离线
我对管道知道的不多,谢谢版主
11 发表于 2008-12-16 18:13 ·  中国 福建 泉州 移动
初级用户
★★
积分 134
发帖 54
注册 2008-11-19 11:47
17年会员
UID 131429
性别 男
状态 离线
2>&1 arp /? | more
论坛跳转: