Update gzip.
[dragonfly.git] / usr.bin / gzip / zdiff.1
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
41 and
42 .Nm zdiff
43 are filters that invoke
44 .Xr cmp 1
45 or
46 .Xr diff 1
47 respectively to compare compressed files.
48 Such files generally have a
49 .Dq Z
50 or
51 .Dq gz
52 extension (both the
53 .Xr compress 1
54 and
55 .Xr gzip 1
56 formats are supported).
57 Any
58 .Ar options
59 that are specified are passed to
60 .Xr cmp 1
61 or
62 .Xr diff 1 .
63 .Pp
64 If only
65 .Ar file1
66 is specified, it is compared against a file with the same name, but
67 with the extension removed.
68 When both
69 .Ar file1
70 or
71 .Ar file2
72 are specified, either file may be compressed.
73 .Sh ENVIRONMENT
74 .Bl -tag -width "TMPDIR"
75 .It Ev TMPDIR
76 Directory in which to place temporary files.
77 If unset,
78 .Pa /tmp
79 is used.
80 .El
81 .Sh FILES
82 .Bl -tag -width "/tmp/zdiff.XXXXXXXXXX" -compact
83 .It Pa /tmp/zcmp.XXXXXXXXXX
84 Temporary file for
85 .Nm zcmp .
86 .It Pa /tmp/zdiff.XXXXXXXXXX
87 Temporary file for
88 .Nm zdiff .
89 .El
90 .Sh SEE ALSO
91 .Xr cmp 1 ,
92 .Xr gzip 1 ,
93 .Xr diff 1
94 .Sh CAVEATS
95 .Nm zcmp
96 and
97 .Nm zdiff
98 rely solely on the file extension to determine what is, or is not,
99 a compressed file.
100 Consequently, the following are not supported as arguments:
101 .Bl -dash
102 .It
103 directories
104 .It
105 device special files
106 .It
107 filenames indicating the standard input
108 .Pq Dq \-
109 .El