<?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 Re: script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040817#M432866</link>
    <description>Today:&lt;BR /&gt;&lt;BR /&gt;cd /directory&lt;BR /&gt;ll -tr &amp;gt; /tmp/inventory.18042007&lt;BR /&gt;&lt;BR /&gt;tomorrow:&lt;BR /&gt;&lt;BR /&gt;cd /directory&lt;BR /&gt;ll -tr &amp;gt; /tmp/inventory.19042007&lt;BR /&gt;diff /tmp/inventory.18042007 /tmp/inventory.19042007&lt;BR /&gt;&lt;BR /&gt;NB - there is no line break in the diff command - it merely shows that way in this box.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
    <pubDate>Wed, 18 Apr 2007 04:35:49 GMT</pubDate>
    <dc:creator>MarkSyder</dc:creator>
    <dc:date>2007-04-18T04:35:49Z</dc:date>
    <item>
      <title>script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040815#M432864</link>
      <description>Hey all,&lt;BR /&gt;&lt;BR /&gt;I am looking for a script or command to find out if any of the files in a given directory have been changed/modified/deleted/added (since the previous run).&lt;BR /&gt;All help is appreciated.&lt;BR /&gt;Thank you.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Luc Monnens</description>
      <pubDate>Wed, 18 Apr 2007 03:30:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040815#M432864</guid>
      <dc:creator>Luc Monnens</dc:creator>
      <dc:date>2007-04-18T03:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040816#M432865</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I suggest to collect a checksum of all directory entires and compare these results:&lt;BR /&gt;chkdir=my/direc/tory&lt;BR /&gt;cd chkdir&lt;BR /&gt;ls -a | xargs cksum | sort &amp;gt;/tmp/base${chkdir##*/}.cksum&lt;BR /&gt;&lt;BR /&gt;For later comparisions:&lt;BR /&gt;...&lt;BR /&gt;ls -a | xargs cksum | sort &amp;gt;/tmp/new${chkdir##*/}.cksum&lt;BR /&gt;&lt;BR /&gt;comm -3 /tmp/base${chkdir##*/}.cksum /tmp/new${chkdir##*/}.cksum&lt;BR /&gt;&lt;BR /&gt;Look at the man pages of 'cksum' and 'comm' for further information. The analysis of the output of the comm command is left as an exercise ....&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 18 Apr 2007 03:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040816#M432865</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-04-18T03:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040817#M432866</link>
      <description>Today:&lt;BR /&gt;&lt;BR /&gt;cd /directory&lt;BR /&gt;ll -tr &amp;gt; /tmp/inventory.18042007&lt;BR /&gt;&lt;BR /&gt;tomorrow:&lt;BR /&gt;&lt;BR /&gt;cd /directory&lt;BR /&gt;ll -tr &amp;gt; /tmp/inventory.19042007&lt;BR /&gt;diff /tmp/inventory.18042007 /tmp/inventory.19042007&lt;BR /&gt;&lt;BR /&gt;NB - there is no line break in the diff command - it merely shows that way in this box.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Wed, 18 Apr 2007 04:35:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040817#M432866</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2007-04-18T04:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040818#M432867</link>
      <description>The simple approach is to leave a file behind when the run is done: # touch last-run.&lt;BR /&gt;Next to find changed files just use find:&lt;BR /&gt;# find ${RUNDIR} -newer last-run&lt;BR /&gt;&lt;BR /&gt;This might not be good enough as it could find files for which the date was change but the data not. And it might not find files for which the contents was changed, but the date reset to fall before the last-run.&lt;BR /&gt;&lt;BR /&gt;I consider both a good feature for most production environments.&lt;BR /&gt;&lt;BR /&gt;But for 'secure' environments you may prefer a checksum mechanism as outlined before as it is 99.99% certain to catch file content modifications.&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Apr 2007 06:12:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040818#M432867</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-04-18T06:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040819#M432868</link>
      <description>Hi Luc,&lt;BR /&gt;&lt;BR /&gt;try running the attached script, specifying the complete path to the dir to check as $1.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Apr 2007 07:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040819#M432868</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-04-18T07:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040820#M432869</link>
      <description>John's script gave me exactly what I was looking for so he got the 10.&lt;BR /&gt;Because of that the others were not really valued on their merrits.&lt;BR /&gt;Thank you all for your input.&lt;BR /&gt;Much appreciated.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Luc</description>
      <pubDate>Fri, 20 Apr 2007 05:02:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/5040820#M432869</guid>
      <dc:creator>Luc Monnens</dc:creator>
      <dc:date>2007-04-20T05:02:07Z</dc:date>
    </item>
  </channel>
</rss>

