chmod, chown: remove redundant flag
This commit is contained in:
parent
95ea9d4a00
commit
20d526391d
6
chmod.1
6
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)
|
||||
|
|
5
chmod.c
5
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++)
|
||||
|
|
4
chown.1
4
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)
|
||||
|
|
5
chown.c
5
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';
|
||||
|
|
Loading…
Reference in New Issue
Block a user