xref: /freebsd/usr.bin/gzip/gzexe.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
19a9ea25fSXin LI.\"	$NetBSD: gzexe.1,v 1.3 2003/12/28 12:49:41 wiz Exp $
29a9ea25fSXin LI.\"	$OpenBSD: gzexe.1,v 1.1 2003/07/31 07:32:47 otto Exp $
39a9ea25fSXin LI.\"
49a9ea25fSXin LI.\" Copyright (c) 2003 Otto Moerbeek <otto@drijf.net>
59a9ea25fSXin LI.\"
69a9ea25fSXin LI.\" Permission to use, copy, modify, and distribute this software for any
79a9ea25fSXin LI.\" purpose with or without fee is hereby granted, provided that the above
89a9ea25fSXin LI.\" copyright notice and this permission notice appear in all copies.
99a9ea25fSXin LI.\"
109a9ea25fSXin LI.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
119a9ea25fSXin LI.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
129a9ea25fSXin LI.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
139a9ea25fSXin LI.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
149a9ea25fSXin LI.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
159a9ea25fSXin LI.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
169a9ea25fSXin LI.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
179a9ea25fSXin LI.Dd January 26, 2007
189a9ea25fSXin LI.Dt GZEXE 1
199a9ea25fSXin LI.Os
209a9ea25fSXin LI.Sh NAME
219a9ea25fSXin LI.Nm gzexe
229a9ea25fSXin LI.Nd create auto-decompressing executables
239a9ea25fSXin LI.Sh SYNOPSIS
249a9ea25fSXin LI.Nm gzexe
259a9ea25fSXin LI.Op Fl d
269a9ea25fSXin LI.Ar
279a9ea25fSXin LI.Sh DESCRIPTION
289a9ea25fSXin LIThe
299a9ea25fSXin LI.Nm
309a9ea25fSXin LIutility uses
319a9ea25fSXin LI.Xr gzip 1
329a9ea25fSXin LIto compress executables, producing executables that decompress on-the-fly
339a9ea25fSXin LIwhen executed.
349a9ea25fSXin LIThis saves disk space, at the cost of slower execution times.
359a9ea25fSXin LIThe original executables are saved by copying each of them to a file with
369a9ea25fSXin LIthe same name with a
379a9ea25fSXin LI.Sq ~
389a9ea25fSXin LIsuffix appended.
399a9ea25fSXin LIAfter verifying that the compressed executables work as expected, the backup
409a9ea25fSXin LIfiles can be removed.
419a9ea25fSXin LI.Pp
429a9ea25fSXin LIThe options are as follows:
439a9ea25fSXin LI.Bl -tag -width Ds
449a9ea25fSXin LI.It Fl d
459a9ea25fSXin LIDecompress executables previously compressed by
469a9ea25fSXin LI.Nm .
479a9ea25fSXin LI.El
489a9ea25fSXin LI.Pp
499a9ea25fSXin LIThe
509a9ea25fSXin LI.Nm
519a9ea25fSXin LIprogram refuses to compress non-regular or non-executable files,
529a9ea25fSXin LIfiles with a setuid or setgid bit set, files that are already
539a9ea25fSXin LIcompressed using
549a9ea25fSXin LI.Nm
559a9ea25fSXin LIor programs it needs to perform on-the-fly decompression:
569a9ea25fSXin LI.Xr sh 1 ,
579a9ea25fSXin LI.Xr mktemp 1 ,
589a9ea25fSXin LI.Xr rm 1 ,
599a9ea25fSXin LI.Xr echo 1 ,
609a9ea25fSXin LI.Xr tail 1 ,
619a9ea25fSXin LI.Xr gzip 1 ,
629a9ea25fSXin LIand
639a9ea25fSXin LI.Xr chmod 1 .
649a9ea25fSXin LI.Sh SEE ALSO
659a9ea25fSXin LI.Xr gzip 1
669a9ea25fSXin LI.Sh CAVEATS
679a9ea25fSXin LIThe
689a9ea25fSXin LI.Nm
699a9ea25fSXin LIutility replaces files by overwriting them with the generated
709a9ea25fSXin LIcompressed executable.
719a9ea25fSXin LITo be able to do this, it is required that the original files are writable.
72