1.

How To Redirect Both Standard Output And Standard Error To The Same Location?

Answer»

There two METHODS to REDIRECT STD output and std error to the same location:

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

Method:2 &> (# ls /usr/share/doc &> out.txt )

There two methods to redirect std output and std error to the same location:

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

Method:2 &> (# ls /usr/share/doc &> out.txt )



Discussion

No Comment Found