How the standard output and error redirected to the same location at the same time?

 

方法一:
2>&1 (# ls /usr/share/doc > out.txt 2>&1 )

方法二:
&> (# ls /usr/share/doc &> out.txt )

 

Guess you like

Origin www.cnblogs.com/sea-stream/p/12003105.html