Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

zcmp(1) [mojave man page]

ZDIFF(1)						    BSD General Commands Manual 						  ZDIFF(1)

NAME
zcmp, zdiff -- compare compressed files SYNOPSIS
zcmp [options] file [file2] zdiff [options] file [file2] DESCRIPTION
zcmp and zdiff are filters that invoke cmp(1) or diff(1) respectively to compare compressed files. Any options that are specified are passed to cmp(1) or diff(1). If only file1 is specified, it is compared against a file with the same name, but with the extension removed. When both file1 or file2 are specified, either file may be compressed. Extensions handled by gzip(1): o z, Z, o gz, o taz, o tgz. Extensions handled by bzip2(1): o bz, o bz2, o tbz, o tbz2. Extensions handled by xz(1): o lzma, o xz, o tlz, o txz. ENVIRONMENT
TMPDIR Directory in which to place temporary files. If unset, /tmp is used. FILES
/tmp/zcmp.XXXXXXXXXX Temporary file for zcmp. /tmp/zdiff.XXXXXXXXXX Temporary file for zdiff. SEE ALSO
bzip2(1), cmp(1), diff(1), gzip(1), xz(1) CAVEATS
zcmp and zdiff rely solely on the file extension to determine what is, or is not, a compressed file. Consequently, the following are not supported as arguments: - directories - device special files - filenames indicating the standard input (``-'') BSD
May 23, 2011 BSD

Check Out this Related Man Page

ZDIFF(1)						    BSD General Commands Manual 						  ZDIFF(1)

NAME
zcmp, zdiff -- compare compressed files SYNOPSIS
zcmp [options] file [file2] zdiff [options] file [file2] DESCRIPTION
zcmp and zdiff are filters that invoke cmp(1) or diff(1) respectively to compare compressed files. Any options that are specified are passed to cmp(1) or diff(1). If only file1 is specified, it is compared against a file with the same name, but with the extension removed. When both file1 or file2 are specified, either file may be compressed. Extensions handled by gzip(1): o z, Z, o gz, o taz, o tgz. Extensions handled by bzip2(1): o bz, o bz2, o tbz, o tbz2. Extensions handled by xz(1): o lzma, o xz, o tlz, o txz. ENVIRONMENT
TMPDIR Directory in which to place temporary files. If unset, /tmp is used. FILES
/tmp/zcmp.XXXXXXXXXX Temporary file for zcmp. /tmp/zdiff.XXXXXXXXXX Temporary file for zdiff. SEE ALSO
bzip2(1), cmp(1), diff(1), gzip(1), xz(1) CAVEATS
zcmp and zdiff rely solely on the file extension to determine what is, or is not, a compressed file. Consequently, the following are not supported as arguments: - directories - device special files - filenames indicating the standard input (``-'') BSD
May 23, 2011 BSD
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete compressed files from year 2005

I'm trying to delete files that were created/modified in the year 2005 that we compressed and have the .Z extension on them. I tried using the awk utility but the syntax is incorrect. I don't know how to use a wildcard to capture all the compressed files. Here's the code I used ( ls -lR |... (5 Replies)
Discussion started by: igidttam
5 Replies

2. Shell Programming and Scripting

how to pin files to /tmp

Hi all, Am currently working on editing a startup script that need me to copy a certain file from cdrom to /tmp (its a live cd am working on)and mount if from there to certain place.. Now i know that nothing can be stored in /tmp permanently ,however mechanism to load the file to /tmp on... (19 Replies)
Discussion started by: wrapster
19 Replies

3. Shell Programming and Scripting

compare files

Hi, how to read the 2 files and compare each other in shell script? i have 2 files test1 and test2, both files contains 20 character records.we have to compare file 1 records with file2, if exists then reject the record else we have to append it to test2 file. in file test1 around 100 single... (0 Replies)
Discussion started by: prashanth.spl
0 Replies

4. Shell Programming and Scripting

Temporary named pipes in Hpux Kornshell

Tried the following on Hpux 11.11, using both ksh, and dtksh $diff <(sort file1) <(sort file2) $ ksh: syntax error: `(' unexpected Strange thing is I tried the same command under RHEL5 using ksh 93 and it works fine. Does anyone know if this is possible on HPUX without the use of... (0 Replies)
Discussion started by: fire!
0 Replies

5. Shell Programming and Scripting

go to / skip in script

Hi all I have some script like this #!/bin/bash mv /tmp/file1 tmp/file2 if ] ; then cp /tmp/filetest/ tmp/file3 if ] then echo "succes" else echo "failed" fi else echo "failed" fi i didn't try to see if it's work, the thing is that i don't care if... (4 Replies)
Discussion started by: naamas03
4 Replies

6. Shell Programming and Scripting

Adding a line to a file

Hi guys, How to add a line before a specific line (identified with the starting work ex: xxx) of a file and write it back to the same file? Thanks (12 Replies)
Discussion started by: mwrg
12 Replies

7. Shell Programming and Scripting

Help filter content of a file

Hi all ! I have a file name file1 like this : /A /A/1 /A/2 /B /B/3 /B/4 /tmp/C /tmp/C/5 /tmp/C/6 I want to write a script to take content from file2 and print out to file2 only these lines : /A /B /tmp/C (12 Replies)
Discussion started by: camus
12 Replies

8. UNIX for Dummies Questions & Answers

How to compare files in 2 directories?

Hi, I want to compare the content of 2 directories and list down both the duplicate and unique files from each directory. Tried to use diff but but not able to achieve the result. For example, DirA FileX FileY FileZ DirB FileY The desired outcome is Duplication: FileY... (1 Reply)
Discussion started by: Andre_2008
1 Replies

9. Shell Programming and Scripting

awk 2 files

Hello I have 2 files file1 /tmp/xxx /tmp/yyy /tmp/cccfile2 /tmp/aaa /tmp/ccc /tmp/yyyI would like have output /tmp/aaa - NO So check all entries from file1 in file2 and if entry from file2 not exist in file1 display it. Can someone help write code in AWK? (5 Replies)
Discussion started by: vikus
5 Replies

10. Shell Programming and Scripting

Script to compare files in 2 folders and delete the large file

Hello, my first thread here. I've been searching and fiddling around for about a week and I cannot find a solution.:confused: I have been converting all of my home videos to HEVC and sometimes the files end up smaller and sometimes they don't. I am currently comparing all the video files... (5 Replies)
Discussion started by: Josh52180
5 Replies