Linux event logs file location

As a Windows DBA, the Windows Logs is the place to go for reviewing Application/System/Security events.
 
In the Linux world, the location is /var/log
image1
Once in the log folder you can list the available files using ls and to read a file you can use less filename i.e. less syslog
 
When using less to view a file, pressing h will show the many options available to you for scrolling, searching, exiting etc the file.
image2
Useful less commands include:
g – go to the start of the file
G – go to the end of the file
Spacebar – scroll a full screen
Enter – scroll line by line
/searchpattern – search forward for the pattern i.e. /fail
?searchpattern – search backwards for the pattern i.e. ?fail
q – exist less

Leave a Reply