Redirect stderr and stdout in Bash

后端 未结 15 797
日久生厌
日久生厌 2020-11-22 08:18

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

15条回答
  •  情话喂你
    2020-11-22 08:44

    Take a look here. Should be:

    yourcommand &>filename
    

    (redirects both stdout and stderr to filename).

提交回复
热议问题