Searching logfiles with tail, grep, and company



If your hardware or software goes on strike, or the graphical system or your Internet connection fail, checking the logfiles can often be a big help. In this month’s column, we will look at the command-line tools that can help you scour the depths of these critical files.

Kernel messages, user logins or log offs, network processes, and many other events are logged meticulously by the Linux system. The Linux system’s logging system goes by the name of syslogd (or syslog-ng, “Syslog New Generation” on SUSE Linux); the system logger is a daemon, which is started at system boot time. All log files are stored in the folder /var/ log/ and its subdirectories .

With just a couple of exceptions, most of these protocol files are protected from prying eyes and only readable by the system administrator. To view the files, you can use KDE’s file manager, Konqueror, for example, in system administration mode. To do so, pop up a quick starter by pressing Alt+F2 and type kdesu konqueror, then type the root password after the prompt.