I'd like to be able to export the output (and error messages) of my cygwin terminal in a file, especially since I have to click a lot of buttons in order to mark the stuff in the cygwin terminal (and it's desirable to minimize the amount of clicking I do).
For cygwin, how do I export the output in a terminal into a file?
shell;cygwin;output
The stderr output of an executable can be redirected to a file with the following syntax:mycommand 2> error.txtIf you want to redirect stdout (i.e. the regular program output) to the file, the command should be:mycommand > output.txtTo redirect both the stderr and stdout output to the same file (similar to as seen on terminal), use:mycommand > output_and_error.txt 2>&1