Board logo

标题: [已结]输出重定向问题:为何arp的帮助无法输出到文件? [打印本页]

作者: jackgjs1204     时间: 2008-12-10 16:02    标题: [已结]输出重定向问题:为何arp的帮助无法输出到文件?

我在学习dos的命令时,在用>和>>将dos中的一些命令的说明输出到一个文件中,一般的命令都可以输出到文件中,但是arp却怎么也不行,请各位大侠帮忙。运行结果如下:

  Quote:
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 [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr] [-v]

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


[ Last edited by HAT on 2008-12-16 at 18:17 ]
作者: alchemist     时间: 2008-12-10 16:18
真奇怪,连|MORE也不支持
作者: HAT     时间: 2008-12-10 18:21
CODE:  [Copy to clipboard]
arp /? 2>d:\file1

作者: jackgjs1204     时间: 2008-12-11 09:39
谢谢,非常感谢HAT,加了个2是什么意思,能否讲一下,如果没有时间,可以发个E-mail给我,344790547@qq.com
作者: jackgjs1204     时间: 2008-12-11 09:48
2楼的大侠,more 可以。
C:\>more /? >>d:\file1

C:\>
作者: HAT     时间: 2008-12-11 11:26    标题: Re 4楼

2表示标准出错信息,具体内容可到批处理室搜索“句柄”、“重定向”等。
作者: HAT     时间: 2008-12-11 11:27    标题: Re 5楼

2楼的意思是无法通过管道传递给more
CODE:  [Copy to clipboard]
arp /?|more

作者: dncwl     时间: 2008-12-12 10:08
加2是什么意思,能说明一下吗
作者: HAT     时间: 2008-12-12 14:04    标题: Re 8楼

请参考6楼回复
作者: jackgjs1204     时间: 2008-12-15 23:46
我对管道知道的不多,谢谢版主
作者: wangff     时间: 2008-12-16 18:13
CODE:  [Copy to clipboard]
2>&1 arp /? | more





欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) Powered by Discuz! 2.5