Redirect stderr and stdout in Bash

后端 未结 15 915
日久生厌
日久生厌 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

    For tcsh, I have to use the following command :

    command >& file
    

    If use command &> file , it will give "Invalid null command" error.

提交回复
热议问题