Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

There's more...

When we rotated the logs, and HUPed the syslog daemon, we actually ran this script in logrotate:

$ cat /etc/logrotate.d/syslog /var/log/cron/var/log/maillog/var/log/messages/var/log/secure/var/log/spooler{ missingok sharedscripts postrotate    /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true    endscript}

Of course, there's no reason an application has to use the syslog(3) call to log messages, and it could just as easily write a stream of text to /tmp, but that's entirely up to the application developer in question.

All you need to know as an admin is that most logs will probably end up in text format in /var/log, and you can generally configure log file locations on a program-by-program basis.

Happy ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content