summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2008-05-02 05:40:05 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2008-05-02 05:40:05 +0000
commit01770c79837314c3ec1037bc523f34160042496c (patch)
tree95d665a047d66e359f18cc2d61fc97ca1a03b2f2
parent2e4e881bef69819c438faa8657a905333d23b6e7 (diff)
Notes
-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 c6c113457014..5a7c32aacd62 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 88b963bf86aa..7e33e5bf3dcd 100644
--- a/usr.bin/tar/bsdtar.c
+++ b/usr.bin/tar/bsdtar.c
@@ -638,7 +638,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;