<?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: dir comparison script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446514#M852201</link>
    <description>In Unix, there are any number of ways to do just about anything.  Here's how I would approach your problem:&lt;BR /&gt;&lt;BR /&gt;cd /dir1&lt;BR /&gt;for i in `ls -1`&lt;BR /&gt;do&lt;BR /&gt;if test -f dir2/$i&lt;BR /&gt;then&lt;BR /&gt;           echo "$i is a duplicate"&lt;BR /&gt;           ls -l dir2/$i &amp;gt;&amp;gt;/logfile&lt;BR /&gt;           OWNER=`ls -l dir2/$i|awk '{print $3}`&lt;BR /&gt;           STRING="$i is a duplicate file"&lt;BR /&gt;           echo "$STRING"|mailx -s "$i is a duplicate" $OWNER@somewhere.com&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;</description>
    <pubDate>Tue, 21 Dec 2004 18:09:04 GMT</pubDate>
    <dc:creator>Chris Vail</dc:creator>
    <dc:date>2004-12-21T18:09:04Z</dc:date>
    <item>
      <title>dir comparison script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446511#M852198</link>
      <description>I have two directories; dirA and dirB. Each contains very large number of ordinary files.&lt;BR /&gt;I wanted to find out the duplicate file name in each dir. If found,  write the duplicate file name with full attributes to log and send out a notification to particular user/owner to remove the file from the dir.&lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;dirA&lt;BR /&gt;file1&lt;BR /&gt;file2&lt;BR /&gt;file3&lt;BR /&gt;&lt;BR /&gt;dirB&lt;BR /&gt;file1&lt;BR /&gt;file4&lt;BR /&gt;file5&lt;BR /&gt;&lt;BR /&gt;Can someone help me on this.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Dec 2004 14:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446511#M852198</guid>
      <dc:creator>nauman sheikh</dc:creator>
      <dc:date>2004-12-18T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: dir comparison script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446512#M852199</link>
      <description>Have a look at the dircmp command.&lt;BR /&gt;&lt;BR /&gt;# man dircmp&lt;BR /&gt;&lt;BR /&gt;for more information.</description>
      <pubDate>Sat, 18 Dec 2004 14:50:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446512#M852199</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-12-18T14:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: dir comparison script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446513#M852200</link>
      <description>Or&lt;BR /&gt;&lt;BR /&gt;# find dirA -type f -print | sort &amp;gt; filelistA&lt;BR /&gt;# find dirB -type f -print | sort &amp;gt; filelistB&lt;BR /&gt;# comm -3 filelistA filelistB &amp;gt; commonfiles&lt;BR /&gt;# find `cat commonfiles` -exec your_script {} \;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2004 09:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446513#M852200</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2004-12-21T09:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: dir comparison script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446514#M852201</link>
      <description>In Unix, there are any number of ways to do just about anything.  Here's how I would approach your problem:&lt;BR /&gt;&lt;BR /&gt;cd /dir1&lt;BR /&gt;for i in `ls -1`&lt;BR /&gt;do&lt;BR /&gt;if test -f dir2/$i&lt;BR /&gt;then&lt;BR /&gt;           echo "$i is a duplicate"&lt;BR /&gt;           ls -l dir2/$i &amp;gt;&amp;gt;/logfile&lt;BR /&gt;           OWNER=`ls -l dir2/$i|awk '{print $3}`&lt;BR /&gt;           STRING="$i is a duplicate file"&lt;BR /&gt;           echo "$STRING"|mailx -s "$i is a duplicate" $OWNER@somewhere.com&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Dec 2004 18:09:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dir-comparison-script-help/m-p/3446514#M852201</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2004-12-21T18:09:04Z</dc:date>
    </item>
  </channel>
</rss>

