Quote:
Originally Posted by jkeertir
Dear all,
I am getting error while mounting .it is showing error on the terminal.I want to direct the error message to the file and want that the error message sholud not be displayed on the terminal.
Is there any way to do this?
|
You didn't say which shell you used, but in borne type shells, generally something like > for standard output, and 2> for standard error would work. So program 2> log should work, since error messages tend to be displayed on stderr. In a borne type shell, you can do program > log 2>&1 as well, which logs both stdout and stderr to the same file.
If you ever want to both log and display, you can look at the tee(1) program too.