中国DOS联盟论坛

中国DOS联盟

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

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

游客:  注册 | 登录 | 命令行 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [已结]输出重定向问题:为何arp的帮助无法输出到文件?
作者:
标题: [已结]输出重定向问题:为何arp的帮助无法输出到文件? 上一主题 | 下一主题
jackgjs1204
新手上路





积分 15
发帖 8
注册 2008-12-9
状态 离线
『楼 主』:  [已结]输出重定向问题:为何arp的帮助无法输出到文件? 使用 LLM 解释/回答一下

我在学习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 ]


2008-12-10 16:02
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
alchemist
高级用户




积分 652
发帖 193
注册 2005-9-25
状态 离线
『第 2 楼』:   使用 LLM 解释/回答一下

真奇怪,连|MORE也不支持




ディスケット オペレーティン グシステム
2008-12-10 16:18
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 3 楼』:   使用 LLM 解释/回答一下

arp /? 2>d:\file1




2008-12-10 18:21
查看资料  发短消息  网志   编辑帖子  回复  引用回复
jackgjs1204
新手上路





积分 15
发帖 8
注册 2008-12-9
状态 离线
『第 4 楼』:   使用 LLM 解释/回答一下

谢谢,非常感谢HAT,加了个2是什么意思,能否讲一下,如果没有时间,可以发个E-mail给我,344790547@qq.com


2008-12-11 09:39
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
jackgjs1204
新手上路





积分 15
发帖 8
注册 2008-12-9
状态 离线
『第 5 楼』:   使用 LLM 解释/回答一下

2楼的大侠,more 可以。
C:\>more /? >>d:\file1

C:\>


2008-12-11 09:48
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 6 楼』:  Re 4楼 使用 LLM 解释/回答一下

2表示标准出错信息,具体内容可到批处理室搜索“句柄”、“重定向”等。




2008-12-11 11:26
查看资料  发短消息  网志   编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 7 楼』:  Re 5楼 使用 LLM 解释/回答一下

2楼的意思是无法通过管道传递给more
arp /?|more




2008-12-11 11:27
查看资料  发短消息  网志   编辑帖子  回复  引用回复
dncwl
新手上路





积分 8
发帖 4
注册 2008-3-10
状态 离线
『第 8 楼』:   使用 LLM 解释/回答一下

加2是什么意思,能说明一下吗


2008-12-12 10:08
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 9 楼』:  Re 8楼 使用 LLM 解释/回答一下

请参考6楼回复




2008-12-12 14:04
查看资料  发短消息  网志   编辑帖子  回复  引用回复
jackgjs1204
新手上路





积分 15
发帖 8
注册 2008-12-9
状态 离线
『第 10 楼』:   使用 LLM 解释/回答一下

我对管道知道的不多,谢谢版主


2008-12-15 23:46
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复
wangff
初级用户





积分 134
发帖 54
注册 2008-11-19
状态 离线
『第 11 楼』:   使用 LLM 解释/回答一下

2>&1 arp /? | more


2008-12-16 18:13
查看资料  发送邮件  发短消息  网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: