chmod, chown: remove redundant flag

This commit is contained in:
Connor Lane Smith 2012-05-25 21:52:01 +01:00
parent 95ea9d4a00
commit 20d526391d
4 changed files with 9 additions and 11 deletions

View File

@ -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)

View File

@ -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++)

View File

@ -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)

View File

@ -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';