<?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: file the same file name in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589689#M231152</link>
    <description>Hi,&lt;BR /&gt;Vibhor solution looks much easy to use.&lt;BR /&gt;Just to put it in script e.g. "script1":&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;ls -1 /tmp/dir1 &amp;gt; list1&lt;BR /&gt;ls -1 /tmp/dir2 &amp;gt; list2&lt;BR /&gt;grep -f list1 list2 &lt;BR /&gt;-----------------------------&lt;BR /&gt;&lt;BR /&gt;# chmod +x script1&lt;BR /&gt;# ./script1 dir1 dir2&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 26 Jul 2005 00:59:22 GMT</pubDate>
    <dc:creator>Bharat Katkar</dc:creator>
    <dc:date>2005-07-26T00:59:22Z</dc:date>
    <item>
      <title>file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589686#M231149</link>
      <description>I have two set of files one at /tmp/dir1 , another one is /tmp/dir2 , both two directories has 1200 files , some of them are same file name in both directories , some are different file name , if I want to find out which files are the same files name , could suggest what can I do ? thx.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/tmp/dir1&lt;BR /&gt;file1&lt;BR /&gt;file2&lt;BR /&gt;file3&lt;BR /&gt;file4&lt;BR /&gt;file5&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/tmp/dir2&lt;BR /&gt;file5&lt;BR /&gt;file6&lt;BR /&gt;file7&lt;BR /&gt;file8&lt;BR /&gt;file9&lt;BR /&gt;&lt;BR /&gt;so I would like to find out "file5" as the file are persented at both directories.&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Jul 2005 22:28:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589686#M231149</guid>
      <dc:creator>hangyu</dc:creator>
      <dc:date>2005-07-25T22:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589687#M231150</link>
      <description>for file in `ls -1 /tmp/dir1`&lt;BR /&gt;do&lt;BR /&gt;   if [ -a /tmp/dir2/$file ]&lt;BR /&gt;   then&lt;BR /&gt;       echo $file&lt;BR /&gt;   fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Jul 2005 22:44:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589687#M231150</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-07-25T22:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589688#M231151</link>
      <description>ls -1 /tmp/dir1 &amp;gt; list1&lt;BR /&gt;ls -1 /tmp/dir2 &amp;gt; list2&lt;BR /&gt;&lt;BR /&gt;grep -f list1 list2 &amp;gt; common_files</description>
      <pubDate>Mon, 25 Jul 2005 23:43:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589688#M231151</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-07-25T23:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589689#M231152</link>
      <description>Hi,&lt;BR /&gt;Vibhor solution looks much easy to use.&lt;BR /&gt;Just to put it in script e.g. "script1":&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;ls -1 /tmp/dir1 &amp;gt; list1&lt;BR /&gt;ls -1 /tmp/dir2 &amp;gt; list2&lt;BR /&gt;grep -f list1 list2 &lt;BR /&gt;-----------------------------&lt;BR /&gt;&lt;BR /&gt;# chmod +x script1&lt;BR /&gt;# ./script1 dir1 dir2&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jul 2005 00:59:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589689#M231152</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-07-26T00:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589690#M231153</link>
      <description>Sorry for multiple post ...but change mising in cut paste :)&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;ls -1 $1 &amp;gt; list1&lt;BR /&gt;ls -1 $2 &amp;gt; list2&lt;BR /&gt;grep -f list1 list2 &lt;BR /&gt;-----------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Jul 2005 01:00:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589690#M231153</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-07-26T01:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589691#M231154</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can also use dircmp(1)&lt;BR /&gt;it will give you 2 lists:&lt;BR /&gt;&lt;BR /&gt;1: a list of files that only exist in either dir1 or dir2&lt;BR /&gt;&lt;BR /&gt;2: a list of files which exist in both dirs&lt;BR /&gt;&lt;BR /&gt;Also it compares the files and will tell you if the files are different or the same&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Tue, 26 Jul 2005 01:08:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589691#M231154</guid>
      <dc:creator>Kasper Hedensted</dc:creator>
      <dc:date>2005-07-26T01:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: file the same file name</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589692#M231155</link>
      <description>You can do as,&lt;BR /&gt;&lt;BR /&gt; 1) diff -s /tmp/dir1 /tmp/dir2 | grep 'identical'&lt;BR /&gt;&lt;BR /&gt; 2) dircmp /tmp/test1 /tmp/test2 | grep 'same'&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 26 Jul 2005 03:16:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-the-same-file-name/m-p/3589692#M231155</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-07-26T03:16:18Z</dc:date>
    </item>
  </channel>
</rss>

