Add -R as a synonym to -r for rm(1)
Some scripts require this.
This commit is contained in:
parent
544857623b
commit
7f6d5653c6
5
rm.1
5
rm.1
@ -3,7 +3,7 @@
|
|||||||
rm \- remove files and directories
|
rm \- remove files and directories
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B rm
|
.B rm
|
||||||
.RB [ \-fr ]
|
.RB [ \-fRr ]
|
||||||
.RI [ file ...]
|
.RI [ file ...]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B rm
|
.B rm
|
||||||
@ -13,6 +13,9 @@ removes the given files and directories.
|
|||||||
.B \-f
|
.B \-f
|
||||||
ignore files that cannot be removed.
|
ignore files that cannot be removed.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-R
|
||||||
|
equivalent to -r.
|
||||||
|
.TP
|
||||||
.B \-r
|
.B \-r
|
||||||
remove directories recursively.
|
remove directories recursively.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
3
rm.c
3
rm.c
@ -10,7 +10,7 @@
|
|||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s [-fr] FILE...\n", argv0);
|
eprintf("usage: %s [-fRr] FILE...\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -20,6 +20,7 @@ main(int argc, char *argv[])
|
|||||||
case 'f':
|
case 'f':
|
||||||
rm_fflag = true;
|
rm_fflag = true;
|
||||||
break;
|
break;
|
||||||
|
case 'R':
|
||||||
case 'r':
|
case 'r':
|
||||||
rm_rflag = true;
|
rm_rflag = true;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user