how to find error logs
Hi,
I have doubt that how to find the error logs in /var/log/messages....etc every thing will be written in that file... how to i identify the errors on this please suggest me on this to sort out the error in log file in linux... i use CentOS.... |
Hello,
What error are you looking for? If you want to filter out error messages from a specific process or a specific type of error message, you can always use grep to only show the lines containing your keyword(s). Have a look at the man page for grep: Code:
man grep Eric |
You can find several log files in "/var/log" as you know. To look for warnings/errors that you are interested in, you can simply perform a "search or scan" by using "grep" command as shown below:
Code:
root@localhost ~]# grep 'error' /var/log/messages | tail -n 2 Code:
grep "keyWord or string" fileName Learn more by running this command: Code:
man grep Run this command: Code:
dmesg | grep -i error Code:
|
All times are GMT -5. The time now is 04:45 PM. |