Jan 162010
Sending both output and error message to same file
Answer:
Pick any of the following methods
1.
./foobar &> output.txt
2.
./foobar >& output.txt
3. Most popular
./foobar > output.txt 2>&1
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Sending both output and error message to same file
Answer:
Pick any of the following methods
1.
./foobar &> output.txt
2.
./foobar >& output.txt
3. Most popular
./foobar > output.txt 2>&1