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 April 14, 2010 BSD
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)
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)
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)
how to use while after if???
file=/tmp/test
if cmp /tmp/1 /tmp/2 &> /dev/null
then echo "fail check ok"
while ; do
echo "$file is empty"
wget http://link -O /tmp/test
sleep 3
done
cat /tmp/test
else echo "fail check fail"
do some action
fi (2 Replies)
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)
Hi Friends,
I have a requirement like i have two files in diffrent locations. i want to compare these two files, if both the files are same i want to return "0" else return 1.
Please help me on this.
Thanks
sreenu. (3 Replies)
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)
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)
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)
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)
Hi all ,
Can any one give me the solution for below query.
I have two files .
firstfile:
xyz123
abc234
text2456
secondfile (\home\test)
xyz123:ram
ab34:scrit
text2456:maven
After you compare the ouput should the the common items in both files (2 Replies)
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)
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)