fix usage string
respond `Y' is equal to `y' Add a note how to delete file name with beginning `-'
This commit is contained in:
parent
c8f22f0e34
commit
b0205aff7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14409
18
bin/rm/rm.1
18
bin/rm/rm.1
@ -33,7 +33,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)rm.1 8.2 (Berkeley) 4/18/94
|
||||
.\" $Id$
|
||||
.\" $Id: rm.1,v 1.2 1994/09/24 02:57:00 davidg Exp $
|
||||
.\"
|
||||
.Dd April 18, 1994
|
||||
.Dt RM 1
|
||||
@ -118,10 +118,26 @@ removed.
|
||||
If an error occurs,
|
||||
.Nm rm
|
||||
exits with a value >0.
|
||||
.Sh NOTE
|
||||
.Nm rm
|
||||
use
|
||||
.Xr getopt 3
|
||||
parsing routine. Getopt accept a
|
||||
.Sq Li --
|
||||
argument, which stop reading options, anything after this
|
||||
is not an option.
|
||||
So
|
||||
.Nm rm
|
||||
handle files whose names begins with a
|
||||
.Sq Li - .
|
||||
Example:
|
||||
|
||||
``$ rm -- -filename''.
|
||||
.Sh SEE ALSO
|
||||
.Xr rmdir 1 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh BUGS
|
||||
The
|
||||
|
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: rm.c,v 1.9 1996/02/19 00:44:02 wosch Exp $
|
||||
* $Id: rm.c,v 1.10 1996/02/19 05:57:22 pst Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -377,7 +377,7 @@ check(path, name, sp)
|
||||
first = ch = getchar();
|
||||
while (ch != '\n' && ch != EOF)
|
||||
ch = getchar();
|
||||
return (first == 'y');
|
||||
return (first == 'y' || first == 'Y');
|
||||
}
|
||||
|
||||
#define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
|
||||
@ -409,6 +409,6 @@ void
|
||||
usage()
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "usage: rm [-dfiPRr] file ...\n");
|
||||
(void)fprintf(stderr, "usage: rm [-f | -i] [-dPRr] file ...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user