I am trying to redirect all output from the command line to a file. I am using Bash. Some of the results are directed to a file, but some are still displayed in the terminal and are not saved in the file.
Similar symptoms are described here:
Redirect all output to file
However, I tried the proposed solution (capture stderr) without success:
<cmd> <args> > stdout.txt 2> stderr.txt
The stderr.txt file is created but empty.
A possible hint is that the command line program is a client interacting with the server on the same computer. It is possible that some of the results come from the server. .
Is there a way to capture all the output from the terminal, regardless of its origin?
EDIT:
I confirmed that the missing output is generated by the server. Running the command in a separate terminal causes some output in both terminals, I can transfer all the output from the command line to a file. This causes problems with capturing server output, but that's another matter.
linux bash stdout stderr
Stefan May 30 '13 at 17:03 2013-05-30 17:03
source share