File Comparison utility | Unix Linux Forums | UNIX for Advanced & Expert Users

  Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

File Comparison utility

UNIX for Advanced & Expert Users


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-09-2011
tinivt tinivt is offline
Registered User
 
Join Date: Jan 2007
Last Activity: 4 September 2014, 5:05 AM EDT
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
File Comparison utility

Hi All,

Can anyone tell good file comaparison utilities used in HPUX.
The file size would be 20 MB approx and number of files would be in thousands
so i am in need of a good utility which can give me the difference

Your help is much appreciated .
Sponsored Links
    #2  
Old Unix and Linux 12-09-2011
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 12 February 2015, 7:41 PM EST
Posts: 6,397
Thanks: 288
Thanked 674 Times in 643 Posts
The choice of compare utility or compare program will depend on many factors:

1) Whether these are unix format ascii text files?
2) Whether both files are already in sorted order?
3) Whether you just want to know whether they are different?
4) Whether one file is considered to be the "master" and you want to know the differences relative to the "master" file?
5) Whether there is always a file of the same name (but in a different directory) to compare with?
6) In summary, what's your input and output requirement?
Sponsored Links
    #3  
Old Unix and Linux 12-12-2011
tinivt tinivt is offline
Registered User
 
Join Date: Jan 2007
Last Activity: 4 September 2014, 5:05 AM EDT
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
Hi,

Thanks for the response.


-Its going to same filename in different directories.
-The idea is to check and find the differences between two files with the same in different directory
-we are migrating from one application to another applciation so want to compare the output generated by both applications and find out if there is any difference
-Files are not going to be sorted

In summary I have 2 files with the same name in different directories and i want to compare the difference between the 2 files

Last edited by tinivt; 12-12-2011 at 03:04 AM..
    #4  
Old Unix and Linux 12-12-2011
drl's Unix or Linux Image
drl drl is offline Forum Advisor  
Registered Voter
 
Join Date: Apr 2007
Last Activity: 4 March 2015, 5:22 PM EST
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 1,742
Thanks: 52
Thanked 221 Times in 200 Posts
Hi.

On:

Code:
OS, ker|rel, machine: HP-UX, B.11.11, 9000/712
Distribution        : GenericSysName [HP Release B.11.11] (see /etc/issue)

I found dircmp, which is a fairly common *nix utility:

Code:
 NAME
      dircmp - directory comparison
 DESCRIPTION
      dircmp examines dir1 and dir2 and generates various tabulated
      information about the contents of the directories.  Sorted listings of
      files that are unique to each directory are generated for all the
      options.  If no option is entered, a sorted list is output indicating
      whether the filenames common to both directories have the same
      contents.

-- excerpt from man dircmp

Best wishes ... cheers, drl
Sponsored Links
    #5  
Old Unix and Linux 12-12-2011
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 12 February 2015, 7:41 PM EST
Posts: 6,397
Thanks: 288
Thanked 674 Times in 643 Posts
Assuming that these files are unix format ascii text files.

If you expect them to be identical, then use "cksum" to produce a list of checksums and compare both lists.
The files are too big for a sensible compare with "diff". You'll probably have to sort both files then use "comm" to find the differences.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with file comparison cartrider Shell Programming and Scripting 7 10-19-2011 11:38 AM
How to Unzip a file using unzip utility for files zipped without zip utility ? Sabari Nath S Shell Programming and Scripting 1 12-11-2009 06:18 PM
tsv file comparison Swapna173 UNIX for Dummies Questions & Answers 0 03-25-2009 04:44 AM
COnversion utility xhtml file to Postscript file dattatray.b Solaris 0 08-25-2005 07:36 AM
Veritas File Manager or any File Managing Utility??? TRUEST UNIX for Advanced & Expert Users 1 04-08-2002 04:42 PM



All times are GMT -4. The time now is 12:03 AM.