Redirect stderr and stdout in Bash

flybywire picture flybywire · Mar 12, 2009 · Viewed 743.5k times · Source

I want to redirect both stdout and stderr of a process to a single file. How do I do that in Bash?

Answer

dirkgently picture dirkgently · Mar 12, 2009

Take a look here. Should be:

yourcommand &>filename

(redirects both stdout and stderr to filename).