xref: /freebsd-src/usr.bin/gzip/gzexe.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1*9a9ea25fSXin LI.\"	$NetBSD: gzexe.1,v 1.3 2003/12/28 12:49:41 wiz Exp $
2*9a9ea25fSXin LI.\"	$OpenBSD: gzexe.1,v 1.1 2003/07/31 07:32:47 otto Exp $
3*9a9ea25fSXin LI.\"
4*9a9ea25fSXin LI.\" Copyright (c) 2003 Otto Moerbeek <otto@drijf.net>
5*9a9ea25fSXin LI.\"
6*9a9ea25fSXin LI.\" Permission to use, copy, modify, and distribute this software for any
7*9a9ea25fSXin LI.\" purpose with or without fee is hereby granted, provided that the above
8*9a9ea25fSXin LI.\" copyright notice and this permission notice appear in all copies.
9*9a9ea25fSXin LI.\"
10*9a9ea25fSXin LI.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11*9a9ea25fSXin LI.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12*9a9ea25fSXin LI.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13*9a9ea25fSXin LI.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14*9a9ea25fSXin LI.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15*9a9ea25fSXin LI.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16*9a9ea25fSXin LI.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*9a9ea25fSXin LI.Dd January 26, 2007
18*9a9ea25fSXin LI.Dt GZEXE 1
19*9a9ea25fSXin LI.Os
20*9a9ea25fSXin LI.Sh NAME
21*9a9ea25fSXin LI.Nm gzexe
22*9a9ea25fSXin LI.Nd create auto-decompressing executables
23*9a9ea25fSXin LI.Sh SYNOPSIS
24*9a9ea25fSXin LI.Nm gzexe
25*9a9ea25fSXin LI.Op Fl d
26*9a9ea25fSXin LI.Ar
27*9a9ea25fSXin LI.Sh DESCRIPTION
28*9a9ea25fSXin LIThe
29*9a9ea25fSXin LI.Nm
30*9a9ea25fSXin LIutility uses
31*9a9ea25fSXin LI.Xr gzip 1
32*9a9ea25fSXin LIto compress executables, producing executables that decompress on-the-fly
33*9a9ea25fSXin LIwhen executed.
34*9a9ea25fSXin LIThis saves disk space, at the cost of slower execution times.
35*9a9ea25fSXin LIThe original executables are saved by copying each of them to a file with
36*9a9ea25fSXin LIthe same name with a
37*9a9ea25fSXin LI.Sq ~
38*9a9ea25fSXin LIsuffix appended.
39*9a9ea25fSXin LIAfter verifying that the compressed executables work as expected, the backup
40*9a9ea25fSXin LIfiles can be removed.
41*9a9ea25fSXin LI.Pp
42*9a9ea25fSXin LIThe options are as follows:
43*9a9ea25fSXin LI.Bl -tag -width Ds
44*9a9ea25fSXin LI.It Fl d
45*9a9ea25fSXin LIDecompress executables previously compressed by
46*9a9ea25fSXin LI.Nm .
47*9a9ea25fSXin LI.El
48*9a9ea25fSXin LI.Pp
49*9a9ea25fSXin LIThe
50*9a9ea25fSXin LI.Nm
51*9a9ea25fSXin LIprogram refuses to compress non-regular or non-executable files,
52*9a9ea25fSXin LIfiles with a setuid or setgid bit set, files that are already
53*9a9ea25fSXin LIcompressed using
54*9a9ea25fSXin LI.Nm
55*9a9ea25fSXin LIor programs it needs to perform on-the-fly decompression:
56*9a9ea25fSXin LI.Xr sh 1 ,
57*9a9ea25fSXin LI.Xr mktemp 1 ,
58*9a9ea25fSXin LI.Xr rm 1 ,
59*9a9ea25fSXin LI.Xr echo 1 ,
60*9a9ea25fSXin LI.Xr tail 1 ,
61*9a9ea25fSXin LI.Xr gzip 1 ,
62*9a9ea25fSXin LIand
63*9a9ea25fSXin LI.Xr chmod 1 .
64*9a9ea25fSXin LI.Sh SEE ALSO
65*9a9ea25fSXin LI.Xr gzip 1
66*9a9ea25fSXin LI.Sh CAVEATS
67*9a9ea25fSXin LIThe
68*9a9ea25fSXin LI.Nm
69*9a9ea25fSXin LIutility replaces files by overwriting them with the generated
70*9a9ea25fSXin LIcompressed executable.
71*9a9ea25fSXin LITo be able to do this, it is required that the original files are writable.
72