Sponsored Content
Full Discussion: File Comparison utility
Top Forums UNIX for Advanced & Expert Users File Comparison utility Post 302581130 by drl on Monday 12th of December 2011 06:20:49 AM
Old 12-12-2011
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Veritas File Manager or any File Managing Utility???

Does anyone have any knowledge of veritas file manager and if you do, would you advise me to purchase it?? and basically, what are its most important useful features, meaning, what can it be used for the best (1 Reply)
Discussion started by: TRUEST
1 Replies

2. Solaris

COnversion utility xhtml file to Postscript file

Hi, Can any suggest me some utility to convert xhtml file to postscript file format? Also tell me from where to down load such utility.. With Regards, Dattatray (0 Replies)
Discussion started by: dattatray.b
0 Replies

3. Shell Programming and Scripting

file comparison

hi I have 2 files to comapre ,in file a sible column it is numbers,in file b2 numbers and other values with coma separated. i want compare numbers in file a with file b,and the out put put should be in C with numbers in both file a and b along with other columns of file b. i used folowing... (7 Replies)
Discussion started by: satish.res
7 Replies

4. Shell Programming and Scripting

File Comparison

Hi i have 2 csv files a.csv and b.csv with the same number of columns and a list of values in both of it. Each and every individual value in both the files need to compared and if it matches then print correct in a new csv file otherwise print Incorrect eg a.csv 1,12/27/2007,Reward,$10.00... (5 Replies)
Discussion started by: naveenn08
5 Replies

5. Shell Programming and Scripting

How to Unzip a file using unzip utility for files zipped without zip utility ?

Hi, I need to zip/compress a data file and send to a vendor. The vendor does have only unzip utility and can accept only .ZIP files. I do not have zip utility in my server. How do I zip/compress the file so that it can be deflated using unzip command ? I tried gzip & compress commands, but... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

6. UNIX for Dummies Questions & Answers

file hashing utility in unix

I am looking for a utility that does file hashing in unix. ...Please let me know of any good easy to use utility (3 Replies)
Discussion started by: jbjoat
3 Replies

7. UNIX for Advanced & Expert Users

[HELP!] File transfer utility

May I ask for a top 3 paid file transfer UNIX utilities to improve : automation, ease of use, and improve speed compared to BBFTP? BBFTP is an inconsistent, unsupported, high maintenance file transfer tool. At best, BBFTP has proven to transfer an average rate of 20GB/Hour Total (with 4... (3 Replies)
Discussion started by: annaia
3 Replies

8. Shell Programming and Scripting

File Comparison: Print Lines not present in another file

Hi, I have fileA.txt like this. B01B02 D0011718 B01B03 D0012540 B01B04 D0006145 B01B05 D0004815 B01B06 D0012069 B01B07 D0004064 B01B08 D0011988 B01B09 D0012071 B01B10 D0005596 B01B11 D0011351 B01B12 D0004814 B01C01 D0011804 I want to compare this against another file (fileB.txt)... (3 Replies)
Discussion started by: genehunter
3 Replies

9. Shell Programming and Scripting

File Comparison

HI, I have two files and contains many Fields with | (pipe) delimitor, wanted to compare both the files and get only unmatched perticular fields. this i wanted to use in shell scriting. ex: first.txt 111 |abc| 230| hbc231 |bbb |210 |bbd405 |ghc |555 |cgv second.txt 111 |abc |230 |hbc231... (1 Reply)
Discussion started by: prawinmca
1 Replies

10. UNIX for Beginners Questions & Answers

UNIX utility to find difference in folder, file and contents of file against a base version

Hi, I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility? Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 Replies
diff(1) 						      General Commands Manual							   diff(1)

NAME
diff - differential file and directory comparator SYNOPSIS
n] name] dir1 dir2 n] name] file1 file2 string] file1 file2 DESCRIPTION
Comparing Directories If both arguments are directories, sorts the contents of the directories by name, then runs the regular file algorithm (described below) on text files that have the same name in each directory but are different. Binary files that differ, common subdirectories, and files that appear in only one directory are listed. When comparing directories, the following options are recognized: Long output format; each text file is piped through to paginate it (see pr(1)). Other differences are remembered and summarized after all text file dif- ferences are reported. Applies recursively to common subdirectories encountered. reports files that are identical but otherwise not mentioned. Starts a directory in the middle of the sorted directory, beginning with file name. Comparing Files When run on regular files, and when comparing text files that differ during directory comparison, tells what lines must be changed in the files to bring them into agreement. usually finds a smallest sufficient set of file differences. However, it can be misled by lines con- taining very few characters or by other situations. If neither file1 nor file2 is a directory, either can be specified as in which case the standard input is used. If file1 is a directory, a file in that directory whose filename is the same as the filename of file2 is used (and vice versa). There are several options for output format. The default output format contains lines resembling the following: These lines resemble commands to convert file1 into file2. The numbers after the letters pertain to file2. In fact, by exchanging for and reading backwards one may ascertain equally how to convert file2 into file1. As in identical pairs where n1=n2 or n3=n4 are abbreviated as a single number. Following each of these lines come all the lines that are affected in the first file flagged by then all the lines that are affected in the second file flagged by Except for or which can be given with any of the others, the following options are mutually exclusive: Produce a script of and commands for the editor suitable for recreating file2 from file1. Extra commands are added to the output when compar- ing directories with so that the result is a shell script for converting text files common to the two directories from their state in dir1 to their state in dir2. Produce a script similar to that of the option that is not useful with but is more readable by humans. Produce a script similar to that of but in the opposite order, and with a count of changed lines on each insert or delete command. This is the form used by (see rcsdiff(1)). Produce a difference list with 3 lines of context. modifies the output format slightly: the output begins with identification of the files involved, followed by their cre- ation dates, then each change separated by a line containing about twelve asterisks Lines removed from file1 are marked with and lines added to file2 are marked Lines that change from one file to the other are marked in both files with with Changes that lie within 3 lines of each other in the file are grouped together on output. Output format similar to but with n lines of context. Do a fast, half-hearted job. This option works only when changed stretches are short and well separated, but can be used on files of unlimited length. Create a merged version of file1 and file2 on the standard output, with C preprocessor controls included so that a compilation of the result without defining string is equivalent to compiling file1, while compiling the result with string defined is equivalent to compiling file2. Ignore trailing space characters, except newline character and treat other string of blanks as equal. For example, and are treated as equal. Ignore all space characters, except newline character. For example, and are treated as equal. Ignores uppercase/lowercase differences. Thus is treated the same as Expand tabs in output lines. Normal or output adds one or more characters to the front of each line. Resulting misalignment of indentation in the orig- inal source lines can make the output listing difficult to interpret. This option preserves original source file indenta- tion. EXTERNAL INFLUENCES
Environment Variables determines the locale to use for the locale categories when both and the corresponding environment variable (beginning with do not specify a locale. If is not set or is set to the empty string, a default of "C" (see lang(5)) is used. determines the space characters for the command, and the interpretation of text within file as single- and/or multi-byte characters. determines the language in which messages are displayed. If any internationalization variable contains an invalid setting, and behave as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported with the exception that and do not recognize multi-byte alternative space charac- ters. RETURN VALUE
Upon completion, returns with one of the following exit values: 0 No differences were found. 1 Differences were found. >1 An error occurred. EXAMPLES
The following command creates a script file is added to the end of the script in order to save the file: The script file can then be used to create the file from the file using the editor in the following manner: The following command produces the difference output with 2 lines of context information before and after the line that was different: The following command ignores all blanks and tabs and ignores uppercase-lowercase differences. WARNINGS
Editing scripts produced by the or option are naive about creating lines consisting of a single dot When comparing directories with the or options specified, first compares the files in the same manner as then runs the algorithm if they are not equal. This may cause a small amount of spurious output if the files are identical except for insignificant blank strings or uppercase/lowercase differences. The default algorithm requires memory allocation of roughly six times the size of the file. If sufficient memory is not available for han- dling large files, the option or can be used (see bdiff(1)). With other options if sufficient memory is not available, then either the or values can be increased. When run on directories with the option, recursively descends sub-trees. When comparing deep multi-level directories, more memory may be required than is currently available on the system. The amount of memory required depends on the depth of recursion and the size of the files. AUTHOR
was developed by AT&T, the University of California, Berkeley, and HP. FILES
used by option SEE ALSO
bdiff(1), cmp(1), comm(1), diff3(1), diffmk(1), dircmp(1), ed(1), more(1), nroff(1), rcsdiff(1), sccsdiff(1), sdiff(1), terminfo(4). STANDARDS CONFORMANCE
diff(1)
All times are GMT -4. The time now is 11:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy