<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Inotify on Amit Agarwal Linux Blog</title>
    <link>/tags/inotify/</link>
    <description>Recent content in Inotify on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 28 Jan 2014 00:41:45 +0000</lastBuildDate>
    
	<atom:link href="/tags/inotify/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>inotify -watch for file to change</title>
      <link>/2014/01/28/inotify-watch-file-change/</link>
      <pubDate>Tue, 28 Jan 2014 00:41:45 +0000</pubDate>
      
      <guid>/2014/01/28/inotify-watch-file-change/</guid>
      <description>&lt;p&gt;Here is a simple command for you. It uses &lt;a class=&#34;zem_slink&#34; title=&#34;Inotify&#34; href=&#34;http://en.wikipedia.org/wiki/Inotify&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;inotify&lt;/a&gt; tools. So first you need to install :&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;sudo yum install inotify-tools&lt;/pre&gt;
&lt;p&gt;and then you can try something like this:&lt;/p&gt;
&lt;pre class=&#34;brush: actionscript3; gutter: true; first-line: 1&#34;&gt;while true; 
do 
inotifywait -r -e modify --exclude=&#34;.swp&#34; . &amp;&amp; make; 
done&lt;/pre&gt;
&lt;p&gt;Here, once the file changes, we are running make, but you can do anything you want.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul zemanta-article-ul-image&#34; style=&#34;margin: 0; padding: 0; overflow: hidden;&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://dietbuddha.blogspot.com/2013/12/development-server-automatic-reload-on.html&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i1.wp.com/i.zemanta.com/noimg_111_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://dietbuddha.blogspot.com/2013/12/development-server-automatic-reload-on.html&#34; target=&#34;_blank&#34;&gt;Development Server: Automatic Reload on Code Change&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li-image zemanta-article-ul-li&#34; style=&#34;padding: 0; background: none; list-style: none; display: block; float: left; vertical-align: top; text-align: left; width: 84px; font-size: 11px; margin: 2px 10px 10px 2px;&#34;&gt;
    &lt;a style=&#34;box-shadow: 0px 0px 4px #999; padding: 2px; display: block; border-radius: 2px; text-decoration: none;&#34; href=&#34;http://stackoverflow.com/questions/4936229/concurrent-or-lock-access-in-bash-script-function&#34; target=&#34;_blank&#34;&gt;&lt;img style=&#34;padding: 0; margin: 0; border: 0; display: block; width: 80px; max-width: 100%;&#34; alt=&#34;&#34; src=&#34;https://i2.wp.com/i.zemanta.com/noimg_11_80_80.jpg?w=688&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;&lt;a style=&#34;display: block; overflow: hidden; text-decoration: none; line-height: 12pt; height: 80px; padding: 5px 2px 0 2px;&#34; href=&#34;http://stackoverflow.com/questions/4936229/concurrent-or-lock-access-in-bash-script-function&#34; target=&#34;_blank&#34;&gt;Concurrent or lock access in bash script function&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Inotify Example - Introduction to Inotify with a C Program Example</title>
      <link>/2010/05/24/inotify/</link>
      <pubDate>Mon, 24 May 2010 16:25:39 +0000</pubDate>
      
      <guid>/2010/05/24/inotify/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.thegeekstuff.com/2010/04/inotify-c-program-example/&amp;quot;&amp;gt;Inotify Example: Introduction to Inotify with a C Program Example&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&amp;lt;a class=&amp;quot;zem_slink freebase/en/inotify&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Inotify&amp;quot; title=&amp;quot;Inotify&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;inotify&lt;/a&gt; utility is an effective tool to monitor and notify &amp;lt;a class=&amp;quot;zem_slink freebase/en/file_system&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/File_system&amp;quot; title=&amp;quot;File system&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;filesystem&lt;/a&gt; changes. You can specify a list of files and directories that needs to be monitored by inotify. This &amp;lt;a class=&amp;quot;zem_slink freebase/guid/9202a8c04000641f8000000000023d0f&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Library&amp;quot; title=&amp;quot;Library&amp;quot; rel=&amp;quot;wikipedia&amp;quot;&amp;gt;library&lt;/a&gt; is used by various other programs. For example, &amp;lt;a class=&amp;quot;zem_slink freebase/en/cpan&amp;quot; href=&amp;quot;http://www.cpan.org/&amp;quot; title=&amp;quot;CPAN&amp;quot; rel=&amp;quot;homepage&amp;quot;&amp;gt;CPAN&lt;/a&gt; module Linux::Inotify is developed based on this library.&lt;br&gt;
iNotify Execution Flow&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
