Did You Know?

When a command is carried out successfully, the results are sent to the standard output file. But if the command fails to execute successfully the results are displayed on the standard error file -your terminal. For example:

   ls -l part1.txt
   part1.txt not found

The ls command fails because the file part1.txt does not exist in the current directory. A message is sent to the standard error - your terminal - informing you of this.

You can redirect the standard error away from your terminal to another file but this is generally discouraged. The method for doing this also varies slightly with different shells. Consult the manual page for the shell that you are using for further details.


[Home] [Search] [Index] This site maintained by unixhelp@mathcs.duq.edu