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