sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 20d526391d7d7ad6fc64a4085e8fe88d5b350da3
parent 95ea9d4a0064ebe2d7ce6f23029ade8687c473be
Author: Connor Lane Smith <cls@lubutu.com>
Date:   Fri May 25 21:52:01 +0100

chmod, chown: remove redundant flag
Diffstat:
chmod.1 | 6+++---
chmod.c | 5++---
chown.1 | 4++--
chown.c | 5++---
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/chmod.1 b/chmod.1 @@ -3,12 +3,12 @@ chmod \- change file mode .SH SYNOPSIS .B chmod -.RB [ \-Rr ] +.RB [ \-r ] .I octal .RI [ file ...] .P .B chmod -.RB [ \-Rr ] +.RB [ \-r ] .RB [ ugoa ]*[ +-= ][ rwxs ]* .RI [ file ...] .SH DESCRIPTION @@ -65,7 +65,7 @@ setuid and setgid attributes. .PD .SH OPTIONS .TP -.B \-R, \-r +.B \-r change directory mode recursively. .SH SEE ALSO .IR chmod (2) diff --git a/chmod.c b/chmod.c @@ -18,9 +18,8 @@ main(int argc, char *argv[]) { char c; - while((c = getopt(argc, argv, "Rr")) != -1) + while((c = getopt(argc, argv, "r")) != -1) switch(c) { - case 'R': case 'r': rflag = true; break; @@ -28,7 +27,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } if(optind == argc) - eprintf("usage: %s [-Rr] mode [file...]\n", argv[0]); + eprintf("usage: %s [-r] mode [file...]\n", argv[0]); parsemode(argv[optind++]); for(; optind < argc; optind++) diff --git a/chown.1 b/chown.1 @@ -3,7 +3,7 @@ chown \- change file ownership .SH SYNOPSIS .B chown -.RB [ \-Rr ] +.RB [ \-r ] .RI [ owner ][: group ] .RI [ file ...] .SH DESCRIPTION @@ -11,7 +11,7 @@ chown \- change file ownership changes the user or group ownership for the given files. .SH OPTIONS .TP -.B \-R, \-r +.B \-r change directory ownership recursively. .SH SEE ALSO .IR chown (2) diff --git a/chown.c b/chown.c @@ -19,9 +19,8 @@ main(int argc, char *argv[]) { char c, *owner, *group; - while((c = getopt(argc, argv, "Rr")) != -1) + while((c = getopt(argc, argv, "r")) != -1) switch(c) { - case 'R': case 'r': rflag = true; break; @@ -29,7 +28,7 @@ main(int argc, char *argv[]) exit(EXIT_FAILURE); } if(optind == argc) - eprintf("usage: %s [-Rr] [owner][:group] [file...]\n", argv[0]); + eprintf("usage: %s [-r] [owner][:group] [file...]\n", argv[0]); owner = argv[optind++]; if((group = strchr(owner, ':'))) *group++ = '\0';