Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xzdiff(1) [freebsd 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), bzip2(1), or lzop(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 uncompressed 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), lzop(1), zdiff(1) BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified. Tukaani 2011-03-19 XZDIFF(1)

Check Out this Related Man Page

DIFF(1) 						      General Commands Manual							   DIFF(1)

NAME
diff - differential file comparator SYNOPSIS
diff [ -efbh ] file1 file2 DESCRIPTION
Diff tells what lines must be changed in two files to bring them into agreement. If file1 (file2) is `-', the standard input is used. If file1 (file2) is a directory, then a file in that directory whose file-name is the same as the file-name of file2 (file1) is used. The normal output contains 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 -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. In connection with -e, the following shell program may help maintain multiple versions of a file. Only an ancestral file ($1) and a chain of version-to-version ed scripts ($2,$3,...) made by diff need be on hand. A `latest version' appears on the standard output. (shift; cat $*; echo '1,$p') | ed - $1 Except in rare circumstances, diff finds a smallest sufficient set of file differences. Option -h does a fast, half-hearted job. It works only when changed stretches are short and well separated, but does work on files of unlimited length. Options -e and -f are unavailable with -h. FILES
/tmp/d????? /usr/lib/diffh for -h SEE ALSO
cmp(1), comm(1), ed(1) DIAGNOSTICS
Exit status is 0 for no differences, 1 for some, 2 for trouble. BUGS
Editing scripts produced under the -e or -f option are naive about creating lines consisting of a single `.'. DIFF(1)
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

compare files and beyond

I am having a brain cramp. I have file1 and file2. I want to compare file1 and file2 to pull out the differences. I am using diff and putting the results to a new file diff file1 file2 | grep "<" > differences.out I want to take differences.out and tag a date to the beginning of each... (2 Replies)
Discussion started by: MizzGail
2 Replies

2. UNIX for Dummies Questions & Answers

get diff beteween two files

I have file1 and file2. I am trying to get the difference between the two of them to another file? I have tried diff and fgrep with no luck.. I dont think I am using the proper switches to make this happen. Can someone please give me the key to this lock? Muchos Thanks. Tbone (2 Replies)
Discussion started by: jtrevinojr
2 Replies

3. UNIX for Dummies Questions & Answers

sort

Sort file1 > tmp1 Sort file 2> tmp2 diff tmp1 tmp2 file1 is source mapped to file2.just simple map using etl. jus trying to diff and see they match. The no of fields are same in both and in the same order seperated by a comma. I tried using sort -t, +3 for some case where it worked. ... (2 Replies)
Discussion started by: thumsup9
2 Replies

4. UNIX for Dummies Questions & Answers

diff

hi all, i want to do this shell script. create a script that will check the transferred file vs. orig file. 1. diff the file1 and file2 2. if difference found, retain the original file and email to netcracker team. 3. if no difference found, delete the previous file and retain... (3 Replies)
Discussion started by: tungaw2004
3 Replies

5. Solaris

compare huge file

Hi, I have files with records of 40,00,000& 39,00,000 and i want to find out the content 1.which is existing in file1 and not in file2. 2.Which is exisitng in file2 and not in file1. The format of the file will be like 404ABCDEFGHIJK|CDEFGHIJK|1234567890|1 If its a smaller one i... (1 Reply)
Discussion started by: salaathi
1 Replies

6. Shell Programming and Scripting

Find match in two diff file - local srv and remote server

Perl Guru.... I need to compare two diff file (file1.abc will locate in current server and file2.abc will locate in remote server), basically the script will look for match in both file and only will send out email if there is no match and also give me list of unmatch and dups as well. So... (0 Replies)
Discussion started by: amir07
0 Replies

7. UNIX for Dummies Questions & Answers

how to compare names of files?

hi, can somebody tell me how to compare names of files? the situation is I have 2 files file1 and file2 and I want to figure out which file has the biggest ending, in this case file2 is. thank you (3 Replies)
Discussion started by: s3270226
3 Replies

8. UNIX for Dummies Questions & Answers

Diff command with a condition

Hi I have 2 files test1 & test2. Test1 contains : BSC AFCN Test2 contains: AFCN I than use the following command : diff file1 file2 which displays than displays : 2d1 < BSC Basically I want to confirm that except for "BSC", AFCN is the only word in each file.So when I do a... (6 Replies)
Discussion started by: Prega
6 Replies

9. Shell Programming and Scripting

Compare files using awk

Please help me to compare two files and remove the items in file2 from file1 file 1:delimited using pipe(|) file1 00012|Description - 1|||||AA12345|1|AB12345|2|2012/06/03 AB123|Description - 2|||||AA12345|3|ZA11111|4|2012/06/04 11111|Description - 3|||||AP00012|1|AB12345|2|2012/06/03... (8 Replies)
Discussion started by: Mary James
8 Replies

10. UNIX for Dummies Questions & Answers

Compare two text files

Hello guys, I have file1 and file2, two text files containing various lines. I'm trying to find a way to compare file1 and file2: If the first 7 characters of a line in file2 match the first 7 characters of a line in file1, then do not do anything. Print out the lines of file1 (in file3,... (3 Replies)
Discussion started by: bobylapointe
3 Replies

11. Shell Programming and Scripting

gzip

how to zip all log file in a folder expect the latest gzip * ---> will zip all log files but I don't want the latest file to be zipped ex: file1, file2, file3, file4, file5 any single command to gzip all files excpet file5 ? (2 Replies)
Discussion started by: rmann
2 Replies

12. Shell Programming and Scripting

How to use sed to search a particular pattern in a file backward after a pattern is matched.?

Hi, I have two files file1.txt and file2.txt. Please see the attachments. In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies

13. Shell Programming and Scripting

Comparing two files field and position

I have two files : file1 and file2 file1 format: 7026-H70 7026-1017685 7026-H70 7026-1017687 7026-B80 7026-108D65A 7026-B80 7026-108D67A 7046-B50 7026-1034B4A File2 format : mt01cp01 7026-B80 01108D69A mt01cp02 7026-B80 01108D68A mt01sv01 7046-B50... (7 Replies)
Discussion started by: amir07
7 Replies