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

  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 Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 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 12-09-2011
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 25 November 2014, 5:09 PM EST
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 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 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 12-12-2011
drl's Avatar
drl drl is offline Forum Advisor  
Registered Voter
 
Join Date: Apr 2007
Last Activity: 25 November 2014, 12:28 PM EST
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 1,703
Thanks: 42
Thanked 201 Times in 183 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 12-12-2011
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 25 November 2014, 5:09 PM EST
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 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 Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:13 PM.