xref: /dragonfly/usr.bin/gzip/zdiff.1 (revision 0ca59c34)
1.\"	$NetBSD: zdiff.1,v 1.2 2003/12/28 12:43:43 wiz Exp $
2.\"	$OpenBSD: zdiff.1,v 1.2 2003/07/13 17:39:14 millert Exp $
3.\"	$DragonFly: src/usr.bin/gzip/zdiff.1,v 1.1 2004/10/26 11:19:31 joerg Exp $
4.\"
5.\" Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
6.\"
7.\" Permission to use, copy, modify, and distribute this software for any
8.\" purpose with or without fee is hereby granted, provided that the above
9.\" copyright notice and this permission notice appear in all copies.
10.\"
11.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18.\"
19.\" Sponsored in part by the Defense Advanced Research Projects
20.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
21.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
22.\"
23.Dd June 23, 2003
24.Dt ZDIFF 1
25.Os
26.Sh NAME
27.Nm zcmp ,
28.Nm zdiff
29.Nd compare compressed files
30.Sh SYNOPSIS
31.Nm zcmp
32.Op Ar options
33.Ar file
34.Op Ar file2
35.Nm zdiff
36.Op Ar options
37.Ar file
38.Op Ar file2
39.Sh DESCRIPTION
40.Nm zcmp
41and
42.Nm zdiff
43are filters that invoke
44.Xr cmp 1
45or
46.Xr diff 1
47respectively to compare compressed files.
48Such files generally have a
49.Dq Z
50or
51.Dq gz
52extension (both the
53.Xr compress 1
54and
55.Xr gzip 1
56formats are supported).
57Any
58.Ar options
59that are specified are passed to
60.Xr cmp 1
61or
62.Xr diff 1 .
63.Pp
64If only
65.Ar file1
66is specified, it is compared against a file with the same name, but
67with the extension removed.
68When both
69.Ar file1
70or
71.Ar file2
72are specified, either file may be compressed.
73.Sh ENVIRONMENT
74.Bl -tag -width "TMPDIR"
75.It Ev TMPDIR
76Directory in which to place temporary files.
77If unset,
78.Pa /tmp
79is used.
80.El
81.Sh FILES
82.Bl -tag -width "/tmp/zdiff.XXXXXXXXXX" -compact
83.It Pa /tmp/zcmp.XXXXXXXXXX
84Temporary file for
85.Nm zcmp .
86.It Pa /tmp/zdiff.XXXXXXXXXX
87Temporary file for
88.Nm zdiff .
89.El
90.Sh SEE ALSO
91.Xr cmp 1 ,
92.Xr diff 1 ,
93.Xr gzip 1
94.Sh CAVEATS
95.Nm zcmp
96and
97.Nm zdiff
98rely solely on the file extension to determine what is, or is not,
99a compressed file.
100Consequently, the following are not supported as arguments:
101.Bl -dash
102.It
103directories
104.It
105device special files
106.It
107filenames indicating the standard input
108.Pq Dq \-
109.El
110