What's the difference of redirect an output using “>”, “&>”, “>&” and “2&>”?

后端 未结 2 1554
孤独总比滥情好
孤独总比滥情好 2020-12-23 10:46

What\'s the difference of redirect an output using >, &>, >& and 2&>?

2条回答
  •  不知归路
    2020-12-23 11:00

    1> (or >) is for stdout, the output of a command. 2> is for stderr, the error output of the command.

    This page is a bit wordy, but has good explanations and examples of the different command combinations.

提交回复
热议问题