bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] [PATCH] Add an EXAMPLES section to the tar manpage


From: Trevor Bramwell
Subject: [Bug-tar] [PATCH] Add an EXAMPLES section to the tar manpage
Date: Tue, 19 Dec 2017 13:52:22 -0800

These examples were compiled by the TL;DR community at tldr.sh.

Signed-off-by: Trevor Bramwell <address@hidden>
---
 doc/tar.1 | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/doc/tar.1 b/doc/tar.1
index ddf4fdc..d4fa206 100644
--- a/doc/tar.1
+++ b/doc/tar.1
@@ -1288,6 +1288,37 @@ a compression option (e.g. \fB\-z\fR) was used and the external
 compressor program failed.  Another example is
 .B rmt
 failure during backup to a remote device.
+.SH "EXAMPLES"
+.PP
+Create an archive from files:
+.IP
+\fBtar cf\fR \fItarget.tar file1 file2 file3\fR
+.PP
+Create a gzipped archive:
+.IP
+\fBtar czf\fR \fItarget.tar.gz file1 file2 file3\fR
+.PP
+Extract an archive in a target folder:
+.IP
+\fBtar xf\fR \fIsource.tar\fR \fB-C\fR \fIfolder\fR
+.PP
+Extract a gzipped archive in the current directory:
+.IP
+\fBtar xzf\fR \fIsource.tar.gz\fR
+.PP
+Extract a bzipped archive in the current directory:
+.IP
+\fBtar xjf\fR \fIsource.tar.bz2\fR
+.PP
+Create a compressed archive, using archive suffix to determine the
+compression program:
+.IP
+\fBtar caf\fR \fItarget.tar.xz file1 file2 file3\fR
+.PP
+List the contents of a tar file:
+.IP
+\fBtar tvf\fR \fIsource.tar\fR
+.PP
 .SH "SEE ALSO"
 .BR bzip2 (1),
 .BR compress (1),
-- 
2.7.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]