Where I found log file in linux?
Hi Williams,
In Linux operating system this is very much possible to track every events in log files.
You have all system log file in same directory name /var/log.
You can find different log files and log directories in there, boot.log, mail, cron, httpd, maillog etc.
Here a helpful command you get to see system log is
root@localhost:~#Â dmesg | less
Mr Joseph Clark
Where I found log file in linux?
Hello Meagan,
In Linux, close to all log files are in the following folder location: /var/log directory (and subdirectory).
But it is still possible to change to this directory using cd command in case the files are not in this folder.
Note that you will need to be the root user to successfully do that.
You can be able to use less, more, as well as the cat or tail command in order to see the logs.
You will just need to d the following:
- Go to /var/logs directory:# cd /var/logs
-
And then view common log file /var/log/messages using any one of the following command:
- # tail -f /var/log/messages
- # less /var/log/messages
- # more -f /var/log/messages
- # vi /var/log/messages
Regards,
Carl