Error Redirection
As mentioned previously, along with the standard output, the error messages, if any, produced through executing the command is also shown on the screen. At times it should be hard to catch the error message as it may get mixed up with the standard output. It will be much better, if the error messages are made available separately. With Just as the output is redirected to a file, the error can also be redirected. Within the command line, by proceeding the '>' output redirection symbol through a '2' the standard error message could be redirected.
Practice 1
The subsequent example shows how to redirect the error message.
# ls *.txt 2> /tmp/err.out
# cat /tmp/err.out ls: *.txt not found
In the above instance the error message is redirected to the file /tmp