To redirect stderr
to stdout
and have error messages sent to the same file as standard output, use the following:
正确的写法:command > file 2>&1
> file
redirect the stdout
to file
, and 2>&1
redirect the stderr
to the current location of stdout
.
最新评论