Most UNIX and GMT programs will on occasion write error messages. These are typically written to a separate data stream called stderr and can be redirected separately from the standard output (which goes to stdout). To send the error messages to the same location as standard output we use
UNIXprogram > errors.log 2>&1
When we want to save both program output and error messages to separate files we use the following syntax:
GMTprogram > output.d 2> errors.log