<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Shell scripting: Write message to a syslog / log file</title> <atom:link href="http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Dhruv</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-178196</link> <dc:creator>Dhruv</dc:creator> <pubDate>Sun, 08 Jan 2012 07:55:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-178196</guid> <description>i really like this...</description> <content:encoded><![CDATA[<p>i really like this&#8230;</p> ]]></content:encoded> </item> <item><title>By: Master Of Digital Puppets</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-171905</link> <dc:creator>Master Of Digital Puppets</dc:creator> <pubDate>Mon, 13 Jun 2011 11:57:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-171905</guid> <description>in scripts I use inotify tools</description> <content:encoded><![CDATA[<p>in scripts I use inotify tools</p> ]]></content:encoded> </item> <item><title>By: RemikP</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-170423</link> <dc:creator>RemikP</dc:creator> <pubDate>Fri, 01 Apr 2011 14:04:23 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-170423</guid> <description>According to &lt;a href=&quot;http://linux.die.net/man/1/logger&quot; rel=&quot;nofollow&quot;&gt;manual&lt;/a&gt;, the -f switch is used to write specified file to the standard logfile (most probably messages.log), instead of what i understood from your post, choosing a logfile to write to.
By the way, how can i tell logger to write to my file, instead of messages.log?</description> <content:encoded><![CDATA[<p>According to <a
href="http://linux.die.net/man/1/logger" rel="nofollow">manual</a>, the -f switch is used to write specified file to the standard logfile (most probably messages.log), instead of what i understood from your post, choosing a logfile to write to.<br
/> By the way, how can i tell logger to write to my file, instead of messages.log?</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-158246</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Thu, 22 Jul 2010 00:32:57 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-158246</guid> <description>You need to use &lt;a href=&quot;http://www.cyberciti.biz/faq/linux-inotify-examples-to-replicate-directories/&quot; rel=&quot;nofollow&quot;&gt;incrond&lt;/a&gt;.</description> <content:encoded><![CDATA[<p>You need to use <a
href="http://www.cyberciti.biz/faq/linux-inotify-examples-to-replicate-directories/" rel="nofollow">incrond</a>.</p> ]]></content:encoded> </item> <item><title>By: Tony</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-158244</link> <dc:creator>Tony</dc:creator> <pubDate>Wed, 21 Jul 2010 23:37:58 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-158244</guid> <description>I have this plist file that watches the &quot;WatchDirectory&quot; in my home directory for any changes to files or added files, scripts runs, or files deleted. If a change occurs, it calls the /usr/bin/logger command which basically writes to the /var/log/system.log file. All it writes though is very vague every time, nothing specific: for example
&quot;Jul 21 19:34:41 TonyMAC Tony[16512]: path modified&quot;
Do you know how I can have it write more specific messages like, &quot;a file was deleted&quot;, a script was ran or even a simple - &quot;the change happened in this directory&quot; to the /var/log/system.log file  Thanks in advance.
Label
logger
ProgramArguments
/usr/bin/logger
path modified
WatchPaths
/Users/Tony/WatchDirectory </description> <content:encoded><![CDATA[<p>I have this plist file that watches the &#8220;WatchDirectory&#8221; in my home directory for any changes to files or added files, scripts runs, or files deleted. If a change occurs, it calls the /usr/bin/logger command which basically writes to the /var/log/system.log file. All it writes though is very vague every time, nothing specific: for example</p><p>&#8220;Jul 21 19:34:41 TonyMAC Tony[16512]: path modified&#8221;</p><p>Do you know how I can have it write more specific messages like, &#8220;a file was deleted&#8221;, a script was ran or even a simple &#8211; &#8220;the change happened in this directory&#8221; to the /var/log/system.log file  Thanks in advance.</p><p> Label<br
/> logger<br
/> ProgramArguments</p><p> /usr/bin/logger<br
/> path modified</p><p> WatchPaths</p><p> /Users/Tony/WatchDirectory</p> ]]></content:encoded> </item> <item><title>By: anonymous coward</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-151683</link> <dc:creator>anonymous coward</dc:creator> <pubDate>Sat, 14 Nov 2009 23:11:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-151683</guid> <description>To the poster above who&#039;s rc.local script doesn&#039;t work - if it works when you execute rc.local yourself, then its probably because the PATH isn&#039;t set at that point, and you&#039;ll need to specify the full path to logger.</description> <content:encoded><![CDATA[<p>To the poster above who&#8217;s rc.local script doesn&#8217;t work &#8211; if it works when you execute rc.local yourself, then its probably because the PATH isn&#8217;t set at that point, and you&#8217;ll need to specify the full path to logger.</p> ]]></content:encoded> </item> <item><title>By: abby</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-150535</link> <dc:creator>abby</dc:creator> <pubDate>Sat, 05 Sep 2009 13:29:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-150535</guid> <description>i liked your website can you make new backgrounds please</description> <content:encoded><![CDATA[<p>i liked your website can you make new backgrounds please</p> ]]></content:encoded> </item> <item><title>By: Kongo Ge</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-150039</link> <dc:creator>Kongo Ge</dc:creator> <pubDate>Tue, 11 Aug 2009 09:19:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-150039</guid> <description>Hi,
I like the script very much, but I cannot figure out some parts.. :(
Could you explain what  &quot;&#124;&#124; : &quot; means at the and of three lines, please.
It must be POSIX mode, but what is it doing?
Now I know what &quot;&amp;&amp;&quot; and &quot;II&quot; do.
Thanks,
Ge</description> <content:encoded><![CDATA[<p>Hi,</p><p>I like the script very much, but I cannot figure out some parts.. :(<br
/> Could you explain what  &#8220;|| : &#8221; means at the and of three lines, please.<br
/> It must be POSIX mode, but what is it doing?</p><p>Now I know what &#8220;&amp;&amp;&#8221; and &#8220;II&#8221; do.</p><p>Thanks,<br
/> Ge</p> ]]></content:encoded> </item> <item><title>By: abby</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-149852</link> <dc:creator>abby</dc:creator> <pubDate>Tue, 04 Aug 2009 01:56:03 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-149852</guid> <description>i like how you make starting, i love it</description> <content:encoded><![CDATA[<p>i like how you make starting, i love it</p> ]]></content:encoded> </item> <item><title>By: Diff b/w /etc/crontab and /usr/bin/crontab</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-147013</link> <dc:creator>Diff b/w /etc/crontab and /usr/bin/crontab</dc:creator> <pubDate>Mon, 02 Feb 2009 10:16:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-147013</guid> <description>[...] message to a log file use logger command in script. It will send message to /var/log/messages file. Shell scripting: Write message to a syslog / log file    __________________ Vivek &#124; My personal blog Linux Evangelist  Play hard stay [...]</description> <content:encoded><![CDATA[<p>[...] message to a log file use logger command in script. It will send message to /var/log/messages file. Shell scripting: Write message to a syslog / log file    __________________ Vivek | My personal blog Linux Evangelist  Play hard stay [...]</p> ]]></content:encoded> </item> <item><title>By: unknown123</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-143029</link> <dc:creator>unknown123</dc:creator> <pubDate>Wed, 27 Feb 2008 14:35:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-143029</guid> <description>the following code is not writing either of the messagesto /var/log/messages.What is wrong in the code?
My file is saved at /usr/local/sbin location.example is the name of my file.
if [ -e /usr/local/sbin/example ]; then
logger File exists
else
logger File does not exist
fi
I have added the above code in /etc/rc.local file.
Thankyou in advance</description> <content:encoded><![CDATA[<p>the following code is not writing either of the messagesto /var/log/messages.What is wrong in the code?</p><p>My file is saved at /usr/local/sbin location.example is the name of my file.</p><p>if [ -e /usr/local/sbin/example ]; then<br
/> logger File exists<br
/> else<br
/> logger File does not exist<br
/> fi</p><p>I have added the above code in /etc/rc.local file.</p><p>Thankyou in advance</p> ]]></content:encoded> </item> <item><title>By: Kate Ward</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-88416</link> <dc:creator>Kate Ward</dc:creator> <pubDate>Wed, 14 Mar 2007 14:17:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-88416</guid> <description>If you want to log to a remote Syslog server, the logger command will not work as it logs only to the syslogd on the localhost. log4sh is a logging framework for shell scripts that *can* log to a remote Syslog server as long as netcat is installed.</description> <content:encoded><![CDATA[<p>If you want to log to a remote Syslog server, the logger command will not work as it logs only to the syslogd on the localhost. log4sh is a logging framework for shell scripts that *can* log to a remote Syslog server as long as netcat is installed.</p> ]]></content:encoded> </item> <item><title>By: Ricardo Martins &#187; Blog Archive &#187; Script Shell: enviando mensagens para o syslog ou arquivo de log</title><link>http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-85164</link> <dc:creator>Ricardo Martins &#187; Blog Archive &#187; Script Shell: enviando mensagens para o syslog ou arquivo de log</dc:creator> <pubDate>Sun, 11 Mar 2007 04:24:03 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html#comment-85164</guid> <description>[...] cyberciti.biz, demonstra os passos para enviar mensagens de log de um prompt ou scritp shell&#8230; [ link ] mensagens Scripts shell link syslogConverter em [...]</description> <content:encoded><![CDATA[<p>[...] cyberciti.biz, demonstra os passos para enviar mensagens de log de um prompt ou scritp shell&#8230; [ link ] mensagens Scripts shell link syslogConverter em [...]</p> ]]></content:encoded> </item> </channel> </rss>
