- How can I write a message to /var/log/messages ... the syslog?
How can I write a message to /var/log/messages ... the syslog?
Use the logger command. Eg:
logger "Hello world"
See its man page for options Very handy for script that run in the background (or cron)
Copyright © 2008-2021, dave. Code samples on Dave's Brain is licensed under the
Creative Commons Attribution 2.5 License.
other material, including English text has all rights reserved.