bashshellstdoutio-redirectionstderr

Redirect stderr and stdout in Bash


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


Solution

  • Take a look here. It should be:

    yourcommand &> filename
    

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