当前位置: 技术问答>linux和unix
这个命令行啥意思?
来源: 互联网 发布时间:2015-06-02
本文导语: 假设一个命令为mycom, #mycom >logfile 2>&1 & 我知道最后一个&是放在后台,该命令是写日志文件,但 1、日志文件将放在何处? 2、其中的1、2代表啥意思? 3、第一个&啥意思? | 1、日志文件logfile...
假设一个命令为mycom,
#mycom >logfile 2>&1 &
我知道最后一个&是放在后台,该命令是写日志文件,但
1、日志文件将放在何处?
2、其中的1、2代表啥意思?
3、第一个&啥意思?
#mycom >logfile 2>&1 &
我知道最后一个&是放在后台,该命令是写日志文件,但
1、日志文件将放在何处?
2、其中的1、2代表啥意思?
3、第一个&啥意思?
|
1、日志文件logfile包含mycom的标准输出和标准错误输出
2、standard output (file descriptor 1)
the standard error output (file descriptor 2)
3、没找到第一个&的解释,但bash有如下说明:
ls > dirlist 2>&1
directs both standard output and standard error to the file dirlist
ls 2>&1 > dirlist
directs only the standard output to file dirlist, because the standard error was duplicated as standard output before the standard output was redirected to dirlist.
2、standard output (file descriptor 1)
the standard error output (file descriptor 2)
3、没找到第一个&的解释,但bash有如下说明:
ls > dirlist 2>&1
directs both standard output and standard error to the file dirlist
ls 2>&1 > dirlist
directs only the standard output to file dirlist, because the standard error was duplicated as standard output before the standard output was redirected to dirlist.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。