User:Olegorel/logfiles

= Introduction =
 * Many software (apps, servers, ...) write a log files to analyze what happen when this software been running. To have a log file, the software shall write it, that means what within a software shall be some kind of print-statements.

this software implementation.
 * The most of logs files of the Linux stored under /var/log. The applications and other servers (like web-server) might write their logs to this or other locations, it is depends on


 * Most of the log files are text files, what means that the users could you regular applications like grep, less, cat .... to view and examine the content.


 * Most of the log files has date at the beggining og the line

= Examples =

less /var/log/app
 * Let's assume you have been told that the log file is located at /var/log/app
 * To view this log, you might run the 'less':
 * Inside the less, you could navigate to the beggining og log file by pressing 'g' or to the end by pressing 'G'.
 * Inside the less, you could search for the string you expact to be in the log file, let's assume you entered login name in the Web page as user123, you most likely would be able to find it in the log file. To do that, you need to enter '/' than 'user123' and hit the enter.
 * Once you found the patern you have been looking for, you could scroll the log file back and force by pressing  &  to examine what happen before and after the event.