Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xzdiff(1) [linux man page]

XZDIFF(1)							     XZ Utils								 XZDIFF(1)

NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files SYNOPSIS
xzcmp [cmp_options] file1 [file2] xzdiff [diff_options] file1 [file2] lzcmp [cmp_options] file1 [file2] lzdiff [diff_options] file1 [file2] DESCRIPTION
xzcmp and xzdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed directly to cmp(1) or diff(1). If only one file is specified, then the files compared are file1 (which must have a suffix of a supported compression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom- pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp(1) or diff(1) is preserved. The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils. SEE ALSO
cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1) BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified. Tukaani 2010-09-27 XZDIFF(1)

Check Out this Related Man Page

DIFF(1) 						      General Commands Manual							   DIFF(1)

NAME
diff - differential file comparator SYNOPSIS
diff [ -efbwr ] file1 ... file2 DESCRIPTION
Diff tells what lines must be changed in two files to bring them into agreement. If one file is a directory, then a file in that directory with basename the same as that of the other file is used. If both files are directories, similarly named files in the two directories are compared by the method of diff for text files and cmp(1) otherwise. If more than two file names are given, then each argument is compared to the last argument as above. The -r option causes diff to process similarly named subdirectories recursively. The normal output con- tains lines of these forms: n1 a n3,n4 n1,n2 d n3 n1,n2 c n3,n4 These lines resemble ed commands to convert file1 into file2. The numbers after the letters pertain to file2. In fact, by exchanging `a' for `d' and reading backward one may ascertain equally how to convert file2 into file1. As in ed, 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 `>'. The -b option causes trailing blanks (spaces and tabs) to be ignored and other strings of blanks to compare equal. The -w option causes all white-space to be removed from input lines before applying the difference algorithm. The -e option produces a script of a, c and d commands for the editor ed, which will recreate file2 from file1. The -f option produces a similar script, not useful with ed, in the opposite order. It may, however, be useful as input to a stream-oriented post-processor. Except in rare circumstances, diff finds a smallest sufficient set of file differences. FILES
/tmp/diff[12] SOURCE
/sys/src/cmd/diff SEE ALSO
cmp(1), ed(1) DIAGNOSTICS
Exit status is the empty string for no differences, for some, and for trouble. BUGS
Editing scripts produced under the -e or -f option are naive about creating lines consisting of a single `.'. When running diff on directories, the notion of what is a text file is open to debate. DIFF(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

compare two files

I have file1 and file2: file1: 11 xxx kksd ... 22 kkk kdsglg... 33 sss kdfjdksa... 44 kdsf dskjfkas ... hh kdkf kdkkd.. jg dkf dfkdk ... ... file2: jg 22 hh ... I need to check each line of file1. if the field one is in file2, I will keep it; if not, the whole line will be... (17 Replies)
Discussion started by: fredao
17 Replies

2. UNIX for Dummies Questions & Answers

Comparison of 2 files in UNIX

Hi, There are two files in UNIX system with some lines are exactly the same, some lines are not. I want to compare these two files.The 2 files (both the files have data in Column format )should be compared row wise and any difference in data for a particular row should lead to storage of data of... (32 Replies)
Discussion started by: Dana Evans
32 Replies

3. Shell Programming and Scripting

comparing 2 files - kindly assist expert

Hi, I'm new in shell scripting and would like u guys to help on this. OS: Solaris 9 currently, i have 2 files. file1: hello hi test god file2: hi hello file1 is my masterfile, and i wanted to print out string that are in file1 and NOT in file2 and send out a mail (with the... (15 Replies)
Discussion started by: chew
15 Replies

4. UNIX for Dummies Questions & Answers

Comparing files

Hello guys, I have a little problem, i have my file1 and file2, they have: cat file1 10 11 12 13 14 15 cat file2 10 12 13 15 (14 Replies)
Discussion started by: lestat_ecuador
14 Replies

5. Shell Programming and Scripting

Comparing two files

Hi, I have two files in this format. The files contain the statistics of tables as seen below. The other file is also in this format. I need to compare both the files and if there is a mismatch i need to display the contents within the break lines from both the files for that corresponding... (32 Replies)
Discussion started by: ragavhere
32 Replies

6. Shell Programming and Scripting

loop through two files based on a variable

Hi guyz. i have two files. based on keys(chr1, chr2..) it has to loop through the second file of the same keys and has to take the minimum number after substraction. Sorry if I made my question complicated. file1 chr2 1989 chr2 2500 chr1 1500 file 2 chr1 1339 chr2 2000 chr2 3000... (20 Replies)
Discussion started by: nogu0001
20 Replies

7. UNIX for Dummies Questions & Answers

difference between 2 files in unix

I need the get the difference between 2 files and the result, I need to output it to an other file file1 1 1 2 file2 1 1 2 3 Result....File3=3 used diff file1 file2 > file3 ( not working as expected)..Exact requirement..I have 2 flatfiles to compare and load only the difference in a... (17 Replies)
Discussion started by: win4luv
17 Replies

8. Shell Programming and Scripting

Script to find NOT common strings in two files

Hi all, I'd like you to help or give any advise about the following: I have two (2) files, file1 and file2, both files have information common to each other. The contents of file1 is a subset of the contents of file2: file1: errormsgadmin esdp esgservices esignipa iprice ipvpn irm... (18 Replies)
Discussion started by: hnux
18 Replies

9. UNIX for Dummies Questions & Answers

Adding the content of file in another one...

This might be a weird question, that's not possible, but just wondering: If I have a file for example that has the content: awk '{print "head - "$1" > reduce_lines_"$1}' all And another file that has the content: 221 Is there a way to put the 221 in the space (after head -) of... (27 Replies)
Discussion started by: cosmologist
27 Replies

10. Shell Programming and Scripting

Get values from different columns from file2 when match values of file1

Hi everyone, I have file1 and file2 comma separated both. file1 is: Header1,Header2,Header3,Header4,Header5,Header6,Header7,Header8,Header9,Header10 Code7,,,,,,,,, Code5,,,,,,,,, Code3,,,,,,,,, Code9,,,,,,,,, Code2,,,,,,,,,file2... (17 Replies)
Discussion started by: cgkmal
17 Replies

11. Shell Programming and Scripting

Find common terms in two text file, xargs, grep

Hello, I'm interested in finding all occurrences of the terms in file1 in file2, which are both csv files. I can do this with a loop but I'm interested in knowing if I can also do it with the help of xargs and grep. What I have tried: cat file1 | xargs grep file2 The problem is that... (15 Replies)
Discussion started by: eon
15 Replies

12. Shell Programming and Scripting

Compare files

Hi, I have a req which has two files comparing the first col in one file and last column in second file and write the results to an output file . How would I do this with awk command. Please help me out with this . I appreciate it. Regards raj (15 Replies)
Discussion started by: rajeevm
15 Replies

13. Shell Programming and Scripting

How to get unique of file1 from file2 and save the output?

Please help, file1.txt 1 2 3 4 5 file2.txt 3 4 5 6 7 All I need is this result.txt 1 2 (17 Replies)
Discussion started by: richmac
17 Replies

14. Shell Programming and Scripting

Need help with shell commands (not sure which command is appropriate)

Dear All, I have 2 files namely file1 and file2. in file1 I have something like this Min X = -250.000000, Max X = 250.000000 Min Y = -95.000000, Max Y = 95.000000 Min Z = -95.000000, Max Z = 136.500000 I have to write this date to file2 as xMin -250.000000; xMax 250.000000; yMin... (15 Replies)
Discussion started by: linuxUser_
15 Replies

15. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies