O'Reilly logo

OCA Oracle Solaris 11 System Administration Exam Guide (Exam 1Z0-821) by Michael Ernest

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing Log Messages

The tail -f command is one way to watch a log file as records are added. This option (short for “follow”) copies up to the last 10 lines of the named file, after which it checks the file every second. New lines in the followed file are copied and printed to the tail command’s output. It may seem like a primitive tool, but it’s still popular among operators who need to watch log messages throughout their shift.

You can also write one-line messages to a log file as a user using the logger command. You might do this to incorporate an ad hoc event scheme to your logs, such as noting when a project milestone has been reached, an operational shift has ended, or perhaps to incorporate other information like building access records. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required