<?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: Comparing directory trees in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137478#M154476</link>
    <description>Do you want to identify common files in common subdirectories?&lt;BR /&gt;&lt;BR /&gt;If so then something like this may do:&lt;BR /&gt;&lt;BR /&gt;cd dir1&lt;BR /&gt;find . | sort &amp;gt; tempfile1&lt;BR /&gt;cd dir2&lt;BR /&gt;find . | sort &amp;gt; tempfile2&lt;BR /&gt;comm -12 tempfile1 tempfile2&lt;BR /&gt;rm tempfile1 tempfile2&lt;BR /&gt;&lt;BR /&gt;find will print every file as a relative pathname so you should be able to compare them.</description>
    <pubDate>Fri, 05 Dec 2003 11:39:59 GMT</pubDate>
    <dc:creator>John Palmer</dc:creator>
    <dc:date>2003-12-05T11:39:59Z</dc:date>
    <item>
      <title>Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137474#M154472</link>
      <description>I want to look at 2 similar, large, deep directory trees and identify all common files&lt;BR /&gt;&lt;BR /&gt;I think I need to use ll and comm commands but am stuck because of the way ll lists files in a directory tree.  Instead of listing every file in the tree along with it's directory on one line, it lists the files under headings which specify the directory.&lt;BR /&gt;&lt;BR /&gt;This makes the files impossible to compare!&lt;BR /&gt;&lt;BR /&gt;Anyone ever had to sort this kind of problem or got any bright ideas???</description>
      <pubDate>Fri, 05 Dec 2003 11:29:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137474#M154472</guid>
      <dc:creator>Peter Kempner</dc:creator>
      <dc:date>2003-12-05T11:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137475#M154473</link>
      <description>Try "dircmp" command.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 05 Dec 2003 11:35:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137475#M154473</guid>
      <dc:creator>DIPAK KUMAR ROY</dc:creator>
      <dc:date>2003-12-05T11:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137476#M154474</link>
      <description>dircmp -s</description>
      <pubDate>Fri, 05 Dec 2003 11:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137476#M154474</guid>
      <dc:creator>James A. Donovan</dc:creator>
      <dc:date>2003-12-05T11:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137477#M154475</link>
      <description>Peter,&lt;BR /&gt;&lt;BR /&gt;I'm not sure whether this would help you, but have you looked at the find command?  It will chase down through the directory trees for you, printing out the names of the files as it finds them, or you can ask it to perform a command on each file as it finds them (like ls -l, for example: find /start_dir -exec ll {} \;).  Do a man on "find" and take a look at the examples.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 05 Dec 2003 11:38:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137477#M154475</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-12-05T11:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137478#M154476</link>
      <description>Do you want to identify common files in common subdirectories?&lt;BR /&gt;&lt;BR /&gt;If so then something like this may do:&lt;BR /&gt;&lt;BR /&gt;cd dir1&lt;BR /&gt;find . | sort &amp;gt; tempfile1&lt;BR /&gt;cd dir2&lt;BR /&gt;find . | sort &amp;gt; tempfile2&lt;BR /&gt;comm -12 tempfile1 tempfile2&lt;BR /&gt;rm tempfile1 tempfile2&lt;BR /&gt;&lt;BR /&gt;find will print every file as a relative pathname so you should be able to compare them.</description>
      <pubDate>Fri, 05 Dec 2003 11:39:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137478#M154476</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2003-12-05T11:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137479#M154477</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;cd /dir1&lt;BR /&gt;find . -type f -print |sort &amp;gt; /tmp/dir1&lt;BR /&gt;cd /dir2&lt;BR /&gt;find . -type f -print |sort &amp;gt; /tmp/dir2&lt;BR /&gt;comm -3 /tmp/dir[12]&lt;BR /&gt;rm /tmp/dir[12]&lt;BR /&gt;&lt;BR /&gt;Elena.</description>
      <pubDate>Fri, 05 Dec 2003 12:00:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137479#M154477</guid>
      <dc:creator>Elena Leontieva</dc:creator>
      <dc:date>2003-12-05T12:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137480#M154478</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try this:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;find /dir1 -type f -exec ls -l '{}' ';' | awk -f t11.awk &amp;gt; files1&lt;BR /&gt;find /dir2 -type f -exec ls -l '{}' ';' | awk -f t11.awk &amp;gt; files2&lt;BR /&gt;comm -3 files1 files2&lt;BR /&gt;&lt;BR /&gt;# cat t11.awk&lt;BR /&gt;BEGIN{FSX=FS;}&lt;BR /&gt;{&lt;BR /&gt;  for (i=1; i&amp;lt;=NF-1; i++)&lt;BR /&gt;    printf("%s ",$i);&lt;BR /&gt;  FS="/";&lt;BR /&gt;  printf("%s\n",$NF);&lt;BR /&gt;  FS=FSX;&lt;BR /&gt;}&lt;BR /&gt;END{}&lt;BR /&gt;&lt;BR /&gt;greetings,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Dec 2003 12:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137480#M154478</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2003-12-05T12:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137481#M154479</link>
      <description>Hi,&lt;BR /&gt;I would suggest you to try the join command.&lt;BR /&gt;First create one  file for each directory tree with "find . -print &amp;gt;&lt;OUTFILE&gt;". Then sort the files (sort command).&lt;BR /&gt;Last, "join outfile1 outfile2" which produces an output for each matching line. There is several options for join (for example not matching lines), have a look at the man page.&lt;BR /&gt;&lt;BR /&gt;The difference with join compared to comm is that join worka also when there is not equal numbere of lines in the files and with 1 to many relations.&lt;/OUTFILE&gt;</description>
      <pubDate>Fri, 05 Dec 2003 12:27:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137481#M154479</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-12-05T12:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing directory trees</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137482#M154480</link>
      <description>I'm looking for Mr Peter Kempner,&lt;BR /&gt;&lt;BR /&gt;Lived in Northwood Middlesex in Westbury Road. Is that you?&lt;BR /&gt;&lt;BR /&gt;This is Sandro, the itlaian at jamesaltt@yahoo.it, trying to get in contact with you.&lt;BR /&gt;&lt;BR /&gt;If details do not match, ignore this note&lt;BR /&gt;&lt;BR /&gt;Bye&lt;BR /&gt;&lt;BR /&gt;Sandro</description>
      <pubDate>Sun, 21 Dec 2003 18:34:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/comparing-directory-trees/m-p/3137482#M154480</guid>
      <dc:creator>Sandro_8</dc:creator>
      <dc:date>2003-12-21T18:34:32Z</dc:date>
    </item>
  </channel>
</rss>

