Reputation: 477
I'm running command xxx xxx
in linux, and I want to redirect all output, including std/warn/err output into one file IN ORDER.
How to deal with this?
For example, if I run command xxx xxx 2>file
, the file will only contains error message. If I run command xxx xxx 1>file
, the file will only contains std message. But I want all message together, not devided message. How to deal with this?
Thank you!
Upvotes: 0
Views: 154
Reputation: 472
You could also use this simpler way
$ command arg1 arg2 >& command.out
This is typical C shell way but works well on most advanced shells such as bash.
Upvotes: 0