Quote:
Originally Posted by rtmistler
You also can get stderr piped to that file by changing it to:
|
As far as I am aware, that's not a portable solution (it's not in POSIX), but is accepted by many shells.
ls a > file - stdout (create new file)
ls a 1> file - stdout (create new file)
ls a >> file - stdout (append to existing file)
ls a 2> file - stderr
ls a >file 2>&1 - both stdout and stderr (as suicidaleggroll correctly points out)
If you want to silence either stream, redirect them to /dev/null