summaryrefslogtreecommitdiff
path: root/tar/cmdline.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2010-05-01 17:18:38 -0400
committerTim Kientzle <kientzle@gmail.com>2010-05-01 17:18:38 -0400
commit9dd2a0e1cfc2bd542c99deee4b633c8b7e74a862 (patch)
tree8dfa910cde1c91188ff241a0bcf53682d5eab863 /tar/cmdline.c
parentd02d052b496da3eeb14d0402574319d5ad743657 (diff)
downloadlibarchive-9dd2a0e1cfc2bd542c99deee4b633c8b7e74a862.tar.gz
Add --gid, --gname, --uid, --uname options to tar.
These allow you to override the user/group information both when creating an archive and when restoring an archive. I've also reimplemented --numeric-owner to be a synonym for --gname="" --uname="". Still needs tests... SVN-Revision: 2349
Diffstat (limited to 'tar/cmdline.c')
-rw-r--r--tar/cmdline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tar/cmdline.c b/tar/cmdline.c
index f53a7638..22346f15 100644
--- a/tar/cmdline.c
+++ b/tar/cmdline.c
@@ -85,6 +85,8 @@ static struct option {
{ "file", 1, 'f' },
{ "files-from", 1, 'T' },
{ "format", 1, OPTION_FORMAT },
+ { "gid", 1, OPTION_GID },
+ { "gname", 1, OPTION_GNAME },
{ "gunzip", 0, 'z' },
{ "gzip", 0, 'z' },
{ "help", 0, OPTION_HELP },
@@ -119,6 +121,8 @@ static struct option {
{ "strip-components", 1, OPTION_STRIP_COMPONENTS },
{ "to-stdout", 0, 'O' },
{ "totals", 0, OPTION_TOTALS },
+ { "uid", 1, OPTION_UID },
+ { "uname", 1, OPTION_UNAME },
{ "uncompress", 0, 'Z' },
{ "unlink", 0, 'U' },
{ "unlink-first", 0, 'U' },