Bash – Redirect stderr and stdout in Bash

bashio-redirectionshellstderrstdout

I want to redirect both standard output and standard error of a process to a single file. How do I do that in Bash?

Best Solution

Take a look here. It should be:

yourcommand &> filename

It redirects both standard output and standard error to file filename.