0

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.

eklmp
  • 201
  • 3
  • 9

1 Answers1

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.

Community
  • 1
  • 1
anq
  • 3,102
  • 21
  • 16