Our Linux Log files.
Linux logs are a record of any activity event in Linux OS, the Linux Log files are
invariably stored in the VAR Log directory.
They're in a plain ASCII text format.
Syslog Damon produces logs for the system and different programs in Linux OS.
Syslog is a standard in Linux, Linux OSes.
It also allows you to get forward to a
Syslog server, which is just a consolidation point for the log files.
Again, good idea to get the log files off the system that's being logged.
That ASCII text format means you can use
any text editor to manipulate those log files or clear them out.
Different Linux log files.
Notice that they're all in the VAR log directory.
Messages, off, turn, cron, mail log, QMail, HTTP, light HTB.
And again, you're going to be looking at some examples of these in the labs.
The Linux log format.
Format of Linux log files, the type of
log, the severity of the log, and then the log file location.
We'll talk about the severities here in a second.
Those use standard SIS Log severity levels, which rate from zero to seven.
The lower the value, the more urgent the severity level.
So emergencies are zeros, alerts are ones, criticals are twos, errors are threes,
warnings are fours, notices are five, info is six, and debugs are seven.
Linux Log files.
Again, they're text based or ASCII based text files.
So any text viewing utility or notepad, leaf pad, plume, etc.
Can be used.
The cat command displays the file contents, cat, the file name.
The tail command shows the last 10 lines from a given file.
The head command shows the first 10 lines from a given file.
Less and more allows you to display the contents one page at a time.
More displays the number of lines from a
text file as much as the screen can fit, which is again, one screen at a time.
The grep command, really useful.
Grep command is used for searching specific strings in a files.
Again, you're going to be using some of these commands in the labs, but cat
command is used quite frequently to be the contents of files.
It's got the analog to that in Windows would be like the type command.