aboutsummaryrefslogtreecommitdiff
path: root/doc/cpio.texi
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-01-02 15:44:36 -0500
committerSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 13:33:47 +0200
commit033cd6816fe4db1a6a8f564183333f9b78354246 (patch)
tree482dd462b10dccd8f05ca968dc49d2abfbb4ab1e /doc/cpio.texi
parent9e2d258c81af9f8cedba2e4b8874fbaea59b43c4 (diff)
downloadcpio-033cd6816fe4db1a6a8f564183333f9b78354246.tar.gz
cpio-033cd6816fe4db1a6a8f564183333f9b78354246.tar.bz2
Treat UID/GID as numeric if prefixed by + (-R option)
The IDs supplied with the -R option are treated as numeric (without looking them up in the system database), when prefixed with +. This allows to force using numeric value if a user (group) with a numeric name exists in the database. Reported by Joshua Briefman <sirgatez@gmail.com>. * src/userspec.c (parse_user_spec): Use + as an indicator of a numeric UID/GID. * doc/cpio.1: Document changes. * doc/cpio.texi: Likewise.
Diffstat (limited to 'doc/cpio.texi')
-rw-r--r--doc/cpio.texi22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/cpio.texi b/doc/cpio.texi
index 5a739ab..7c60d5f 100644
--- a/doc/cpio.texi
+++ b/doc/cpio.texi
@@ -295,7 +295,7 @@ Use @var{command} instead of @command{rsh} to access remote archives.
@item -R
@itemx --owner=[@var{user}][:.][@var{group}]
Set the ownership of all files created to the specified @var{user}
-and/or @var{group}.
+and/or @var{group}. @xref{owner}.
@item -v
@itemx --verbose
Verbosely list the files processed.
@@ -515,7 +515,7 @@ Interactively rename files
@item -R
@itemx --owner=[@var{user}][:.][@var{group}]
Set the ownership of all files created to the specified @var{user}
-and/or @var{group}.
+and/or @var{group}. @xref{owner}.
@item -s
@itemx --swap-bytes
Swap the bytes of each halfword in the files
@@ -796,6 +796,7 @@ Run in copy-pass mode.
[@ref{copy-in}]
@*Interactively rename files.
+@anchor{owner}
@item -R @var{owner}
@itemx --owner @var{owner}
[@ref{copy-in},@ref{copy-out},@ref{copy-pass}]
@@ -817,6 +818,23 @@ cpio --owner :users
@end group
@end smallexample
+The argument parts are first looked up in the system user and
+group databases, correspondingly. If any of them is not found there,
+it is treated as numeric UID or GID, provided that it consists of
+decimal digits only.
+
+To avoid the lookup and ensure that arguments are treated as numeric
+values, prefix them with a plus sign, e.g.:
+
+@smallexample
+@group
+cpio --owner +0
+cpio --owner +0:
+cpio --owner +0:+0
+cpio --owner :+0
+@end group
+@end smallexample
+
@noindent
If the group is omitted but the @samp{:} or @samp{.} separator is
given, as in the second example. the given user's login group will be

Return to:

Send suggestions and report system problems to the System administrator.