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