summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2007-02-24 09:29:56 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2007-02-24 09:29:56 +0000
commit478402db561e8b4a313c15170146441c5c1f353d (patch)
tree09c2a6a170696ba5471d6b155b8d2e782ebc634b
parente5fb9320e0039db289e9162d055bc8312c2c04af (diff)
sort options; sync usage(); from Igor Sobrado
-rw-r--r--bin/pax/cpio.179
-rw-r--r--bin/pax/options.c14
2 files changed, 46 insertions, 47 deletions
diff --git a/bin/pax/cpio.1 b/bin/pax/cpio.1
index 490111c454d..64c9818b05e 100644
--- a/bin/pax/cpio.1
+++ b/bin/pax/cpio.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cpio.1,v 1.23 2006/01/03 17:22:47 jmc Exp $
+.\" $OpenBSD: cpio.1,v 1.24 2007/02/24 09:29:55 jmc Exp $
.\"
.\" Copyright (c) 1997 SigmaSoft, Th. Lockert
.\" All rights reserved.
@@ -23,7 +23,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: cpio.1,v 1.23 2006/01/03 17:22:47 jmc Exp $
+.\" $OpenBSD: cpio.1,v 1.24 2007/02/24 09:29:55 jmc Exp $
.\"
.Dd February 16, 1997
.Dt CPIO 1
@@ -34,28 +34,28 @@
.Sh SYNOPSIS
.Nm cpio
.Fl o
-.Op Fl aABcLvzZ
+.Op Fl AaBcLvZz
.Op Fl C Ar bytes
.Op Fl F Ar archive
.Op Fl H Ar format
.Op Fl O Ar archive
-.Ar "< name-list"
-.Op Ar "> archive"
+.Ar \*(Lt name-list
+.Op Ar \*(Gt archive
.Nm cpio
.Fl i
-.Op Fl bBcdfmrsStuvzZ6
+.Op Fl 6BbcdfmrSstuvZz
.Op Fl C Ar bytes
.Op Fl E Ar file
.Op Fl F Ar archive
.Op Fl H Ar format
.Op Fl I Ar archive
-.Op Ar "pattern ..."
-.Op Ar "< archive"
+.Op Ar pattern ...
+.Op Ar \*(Lt archive
.Nm cpio
.Fl p
-.Op Fl adlLmuv
+.Op Fl adLlmuv
.Ar destination-directory
-.Ar "< name-list"
+.Ar \*(Lt name-list
.Sh DESCRIPTION
The
.Nm
@@ -71,23 +71,21 @@ Reads the list of files to store in the
archive from standard input, and writes the archive on standard
output.
.Bl -tag -width Ds
+.It Fl A
+Append to the specified archive.
.It Fl a
Reset the access times on files that have been copied to the
archive.
-.It Fl A
-Append to the specified archive.
.It Fl B
Set block size of output to 5120 bytes.
+.It Fl C Ar bytes
+Set the block size of output to
+.Ar bytes .
.It Fl c
Use ASCII format for
.Nm
header for portability.
-.It Fl C Ar bytes
-Set the block size of output to
-.Ar bytes .
.It Fl F Ar archive
-.It Fl O Ar archive
-Use the specified file name as the archive to write to.
.It Fl H Ar format
Write the archive in the specified format.
Recognized formats are:
@@ -112,17 +110,19 @@ POSIX ustar format.
.El
.It Fl L
Follow symbolic links.
+.It Fl O Ar archive
+Use the specified file name as the archive to write to.
.It Fl v
Be verbose about operations.
List filenames as they are written to the archive.
-.It Fl z
-Compress archive using
-.Xr gzip 1
-format.
.It Fl Z
Compress archive using
.Xr compress 1
format.
+.It Fl z
+Compress archive using
+.Xr gzip 1
+format.
.El
.It Fl i
Restore files from an archive.
@@ -131,30 +131,33 @@ standard input and extracts files matching the
.Ar patterns
that were specified on the command line.
.Bl -tag -width Ds
+.It Fl 6
+Process old-style
+.Nm
+format archives.
+.It Fl B
+Set the block size of the archive being read to 5120 bytes.
.It Fl b
Do byte and word swapping after reading in data from the
archive, for restoring archives created on systems with
a different byte order.
-.It Fl B
-Set the block size of the archive being read to 5120 bytes.
-.It Fl c
-Expect the archive headers to be in ASCII format.
.It Fl C Ar bytes
Read archive written with a block size of
.Ar bytes .
+.It Fl c
+Expect the archive headers to be in ASCII format.
.It Fl d
Create any intermediate directories as needed during
restore.
.It Fl E Ar file
Read list of file name patterns to extract or list from
.Ar file .
+.It Fl F Ar archive , Fl I Ar archive
+Use the specified file as the input for the archive.
.It Fl f
Restore all files except those matching the
.Ar patterns
given on the command line.
-.It Fl F Ar archive
-.It Fl I Ar archive
-Use the specified file as the input for the archive.
.It Fl H Ar format
Read an archive of the specified format.
Recognized formats are:
@@ -181,10 +184,10 @@ POSIX ustar format.
Restore modification times on files.
.It Fl r
Rename restored files interactively.
-.It Fl s
-Swap bytes after reading data from the archive.
.It Fl S
Swap words after reading data from the archive.
+.It Fl s
+Swap bytes after reading data from the archive.
.It Fl t
Only list the contents of the archive, no files or
directories will be created.
@@ -194,18 +197,14 @@ older than the one that will be overwritten.
.It Fl v
Be verbose about operations.
List filenames as they are copied in from the archive.
-.It Fl z
-Uncompress archive using
-.Xr gzip 1
-format.
.It Fl Z
Uncompress archive using
.Xr compress 1
format.
-.It Fl 6
-Process old-style
-.Nm
-format archives.
+.It Fl z
+Uncompress archive using
+.Xr gzip 1
+format.
.El
.It Fl p
Copy files from one location to another in a single pass.
@@ -219,11 +218,11 @@ Reset the access times on files that have been copied.
.It Fl d
Create any intermediate directories as needed to write
the files at the new location.
+.It Fl L
+Follow symbolic links.
.It Fl l
When possible, link files rather than creating an
extra copy.
-.It Fl L
-Follow symbolic links.
.It Fl m
Restore modification times on files.
.It Fl u
diff --git a/bin/pax/options.c b/bin/pax/options.c
index 1d57c233631..d0682535a48 100644
--- a/bin/pax/options.c
+++ b/bin/pax/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.65 2006/11/17 08:38:04 otto Exp $ */
+/* $OpenBSD: options.c,v 1.66 2007/02/24 09:29:55 jmc Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static const char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-static const char rcsid[] = "$OpenBSD: options.c,v 1.65 2006/11/17 08:38:04 otto Exp $";
+static const char rcsid[] = "$OpenBSD: options.c,v 1.66 2007/02/24 09:29:55 jmc Exp $";
#endif
#endif /* not lint */
@@ -1576,10 +1576,10 @@ tar_usage(void)
void
cpio_usage(void)
{
- (void)fputs("usage: cpio -o [-aABcLvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
- (void)fputs(" [-F archive] < name-list [> archive]\n", stderr);
- (void)fputs(" cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
- (void)fputs(" [-I archive] [-F archive] [pattern...] [< archive]\n", stderr);
- (void)fputs(" cpio -p [-adlLmuvV] destination-directory < name-list\n", stderr);
+ (void)fputs("usage: cpio -o [-AaBcLvZz] [-C bytes] [-F archive] [-H format]\n", stderr);
+ (void)fputs(" [-O archive] < name-list [> archive]\n", stderr);
+ (void)fputs(" cpio -i [-6BbcdfmrSstuvZz] [-C bytes] [-E file] [-F archive]\n", stderr);
+ (void)fputs(" [-H format] [-I archive] [pattern...] [< archive]\n", stderr);
+ (void)fputs(" cpio -p [-adLlmuv] destination-directory < name-list\n", stderr);
exit(1);
}