summaryrefslogtreecommitdiff
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2008-08-13 05:39:33 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2008-08-13 05:39:33 +0000
commitfd6bfad3f328f41d3de7b31e371f8fb067703d39 (patch)
tree88ab8afe3a2a2b06a22f9ba6e8846cbd52546943 /usr.bin/tar
parent4ad78deecc798a25c468ee5b5d86c94dd858f86c (diff)
Notes
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/bsdtar.110
-rw-r--r--usr.bin/tar/bsdtar.c2
2 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/tar/bsdtar.1 b/usr.bin/tar/bsdtar.1
index fc5e03976a16..7db6ed897f9d 100644
--- a/usr.bin/tar/bsdtar.1
+++ b/usr.bin/tar/bsdtar.1
@@ -159,7 +159,7 @@ specified pattern.
Note that exclusions take precedence over patterns or filenames
specified on the command line.
.It Fl -format Ar format ( Fl W Cm format Ns = Ns Ar format )
-(c mode only)
+(c, r, u mode only)
Use the specified format for the created archive.
Supported formats include
.Dq cpio ,
@@ -170,6 +170,8 @@ and
Other formats may also be supported; see
.Xr libarchive-formats 5
for more information about currently-supported formats.
+In r and u modes, when extending an existing archive, the format specified
+here must be compatible with the format of the existing archive on disk.
.It Fl f Ar file
Read the archive from or write the archive to the specified file.
The filename can be
@@ -279,7 +281,7 @@ being extracted to disk.
In list (-t) mode, the file listing will be written to stderr rather than
the usual stdout.
.It Fl o
-(x mode only)
+(x mode)
Use the user and group of the user running the program rather
than those specified in the archive.
Note that this has no significance unless
@@ -288,6 +290,10 @@ is specified, and the program is being run by the root user.
In this case, the file modes and flags from
the archive will be restored, but ACLs or owner information in
the archive will be discarded.
+.Pp
+(c, r, u mode)
+A synonym for
+.Fl -format Ar ustar
.It Fl -one-file-system ( Fl W Cm one-file-system )
(c, r, and u modes)
Do not cross mount points.
diff --git a/usr.bin/tar/bsdtar.c b/usr.bin/tar/bsdtar.c
index 7b43432a762e..d05000b62479 100644
--- a/usr.bin/tar/bsdtar.c
+++ b/usr.bin/tar/bsdtar.c
@@ -640,7 +640,7 @@ main(int argc, char **argv)
only_mode(bsdtar, buff, "cxt");
}
if (bsdtar->create_format != NULL)
- only_mode(bsdtar, "--format", "c");
+ only_mode(bsdtar, "--format", "cru");
if (bsdtar->symlink_mode != '\0') {
strcpy(buff, "-?");
buff[1] = bsdtar->symlink_mode;