SyntaxFix
Write A Post
Hire A Developer
Questions
The simplest syntax to redirect both is:
command &> logfile
If you want to append to the file instead of overwrite:
command &>> logfile