Content with Style

Web Technique

MySQL client output logging with tee

by Pascal Opitz on December 3 2008, 13:44

James, the sys admin guy here at Opta, where I am working at the moment, brought this up, and it is one of those neat tricks that can make life very easy but I still didn't know about.

A look in the manual reveals that in the command line 'tee /path/to/file.txt' sets the output file, and 'notee' unsets it and therefore stops the logging.

Alternatively \T and \t can be used.

Happy logging.