Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68241
  • 博文数量: 64
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 610
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-02 09:27
文章分类
文章存档

2009年(2)

2008年(1)

2007年(28)

2006年(33)

我的朋友

分类:

2006-06-02 11:13:51

command 2>&1 >logfile
command >logfile 2>&1
的区别:
Multiple output streams may be redirected to one file.
ls −yz >> command.log 2>&1
# Capture result of illegal options "yz" in file "command.log."
# Because stderr is redirected to the file,
#+ any error messages will also be there.
# Note, however, that the following does *not* give the same result.
ls −yz 2>&1 >> command.log
# Outputs an error message and does not write to file.
# If redirecting both stdout and stderr,
#+ the order of the commands makes a difference
阅读(1370) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Rational Rose MEM_BAD_POINTER

给主人留下些什么吧!~~