What do you use to forward errors to a file?

Phạm Quyết

New member
What do you use to forward errors to a file?
Answer
2 Answers
  1. Redirect stdout to one file and stderr to another file: command > out 2>error.
  2. Redirect stdout to a file ( >out ), and then redirect stderr to stdout ( 2>&1 ): command >out 2>&1.
 

Tìm kiếm

Back
Top