How do I read and/or view logs files under OpenSuse / Novell Enterprise Linux?
You can use the following commands to view / read logs under OpenSuse / Novell Linux or UNIX like operating systems:
- tail command - The tail command displays the contents of file on screen. It can show logs in real time too.
- grep command - The grep command is used to search the log files.
- less command - Another command which can display logs.
- yast / yast2 command - YaST View Start-up Log displays not only the start-up (or boot) log, but various other bits of information.
Log Directory Location
Your logs files are stored in /var/log directory (you must be root user to view log files):
/var/log/message: General message and system related stuff /var/log/boot.log : System boot log /var/log/mysqld.log: MySQL database server log file /var/log/secure: Authentication log /var/log/utmp or /var/log/wtmp : Login records file /var/log/yum.log: Yum log files
How Do I View Log File?
To see /var/log/messagess log file, enter:
tail -f /var/log/messagess less /var/log/messagess more /var/log/messagess
How Do I Search Log File?
Use the grep command as follows:
grep 'search-string' /var/log/messages
egrep 'word1|word2' /var/log/messages
grep --color 'search-wrod2' /var/log/boot.msg
YaST is the most powerful installation and system management tool in the Linux environment. start You can YaST by typing yast
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop