I need to create a log report say .txt file in one directory that saves all the errors that raise after execution of a program which resides in another directory, so which shell command is used in linux.
Asked
Active
Viewed 337 times
1 Answers
0
./command > ./outfiles/out.file 2> ./errfiles/err.file
should do the trick for you.
Sort of answered at: How to pipe stderr, and not stdout? but that questioner wanted a pipe.