How to redirect stdout / stderr to a file
Redirecting all your program output to a file is very simple and can be accomplished like this:
myapp > output.log
This line will send all the output generated by myapp to a file named output.log. The contents of output.log will always be …