summaryrefslogtreecommitdiff
path: root/bin/pax
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-24 21:45:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-24 21:45:33 +0000
commita69b09c3ceb8fe95724a0c3707ee2a9d08d5108f (patch)
treeed54b20cdbde65b077b27a7270912684a65bc2be /bin/pax
parent9456161d39067db41c74cfd10186fed54b537e2d (diff)
examples subsection; s@msmith.net
Diffstat (limited to 'bin/pax')
-rw-r--r--bin/pax/tar.144
1 files changed, 42 insertions, 2 deletions
diff --git a/bin/pax/tar.1 b/bin/pax/tar.1
index a4452c6a9a3..2cd311ce27e 100644
--- a/bin/pax/tar.1
+++ b/bin/pax/tar.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tar.1,v 1.36 2002/01/02 06:19:59 nordin Exp $
+.\" $OpenBSD: tar.1,v 1.37 2002/05/24 21:45:32 deraadt Exp $
.\"
.\" Copyright (c) 1996 SigmaSoft, Th. Lockert
.\" All rights reserved.
@@ -28,7 +28,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: tar.1,v 1.36 2002/01/02 06:19:59 nordin Exp $
+.\" $OpenBSD: tar.1,v 1.37 2002/05/24 21:45:32 deraadt Exp $
.\"
.Dd February 7, 2001
.Dt TAR 1
@@ -226,6 +226,46 @@ The options
.Op Fl 014578
can be used to select one of the compiled-in backup devices,
.Pa /dev/rstN .
+.Sh EXAMPLES
+.Cm $ tar c bonvole sekve
+.Pp
+Creates an archive on the default tape drive, containing the files named
+.Pa bonvole
+and
+.Pa sekve
+.
+.Pp
+.Cm $ tar zcf foriru.tar.gz bonvole sekve
+.Pp
+Outputs a
+.Xr gzip 1
+compressed archive as of the files
+.Pa bonvole
+and
+.Pa sekve
+to a file called
+.Pa foriru.tar.gz
+.Pp
+.Cm $ tar zcvf backup.tar.gz *.c
+.Pp
+Verbosely creates an archive, called
+.Pa backup.tar.gz
+, of all files matching the shell
+.Xr glob 3
+function
+.Pa *.c
+.Pp
+.Cm $ tar tvzf backup.tar.gz '*.jpeg'
+.Pp
+Verbosely lists, but does not extract, all files ending in
+.Pa .jpeg
+from an compressed archive named
+.Pa backup.tar.gz
+.Note that the glob pattern has been quoted to avoid expansion by the shell
+.Pp
+For more detailed examples, see
+.Xr pax 1
+.Pp
.Sh DIAGNOSTICS
.Nm
will exit with one of the following values: