<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic script for File exist or not... in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514522#M61891</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  one application is running on my server. that application will create one log file . when creating that log file automatically send mail from that server.that log file will be available for some time then i will be deleted. after deleting that file i should receive mail .&lt;BR /&gt;&lt;BR /&gt;How to write sript for this? please help&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 15 Oct 2009 02:42:16 GMT</pubDate>
    <dc:creator>friend_1</dc:creator>
    <dc:date>2009-10-15T02:42:16Z</dc:date>
    <item>
      <title>script for File exist or not...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514522#M61891</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  one application is running on my server. that application will create one log file . when creating that log file automatically send mail from that server.that log file will be available for some time then i will be deleted. after deleting that file i should receive mail .&lt;BR /&gt;&lt;BR /&gt;How to write sript for this? please help&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Oct 2009 02:42:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514522#M61891</guid>
      <dc:creator>friend_1</dc:creator>
      <dc:date>2009-10-15T02:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: script for File exist or not...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514523#M61892</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;Use your shell's test built-in:&lt;BR /&gt;&lt;BR /&gt;man 1 test&lt;BR /&gt;man bash&lt;BR /&gt;&lt;BR /&gt;For bash this is documented under CONDITIONAL EXPRESSIONS section of the man page.&lt;BR /&gt;&lt;BR /&gt;The most trivial:&lt;BR /&gt;&lt;BR /&gt;if [ -f /path/to/file ]&lt;BR /&gt;then&lt;BR /&gt;    echo file exists&lt;BR /&gt;else&lt;BR /&gt;    echo file not there&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Another option is to use inotify subsystem with tools like incron, inotify-tools or iwatch.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Goran</description>
      <pubDate>Thu, 15 Oct 2009 04:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514523#M61892</guid>
      <dc:creator>Goran Koruga</dc:creator>
      <dc:date>2009-10-15T04:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: script for File exist or not...</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514524#M61893</link>
      <description>You could also use: &lt;BR /&gt;&lt;BR /&gt;if [ -r file] &lt;BR /&gt;&lt;BR /&gt;because if it is there but you can't read it due to permissions, it won't be a lot us of use to you?</description>
      <pubDate>Fri, 16 Oct 2009 04:03:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-for-file-exist-or-not/m-p/4514524#M61893</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2009-10-16T04:03:12Z</dc:date>
    </item>
  </channel>
</rss>

