Add an EXAMPLES section to answer PR 22255
This commit is contained in:
parent
c223370599
commit
e008163968
19
bin/rm/rm.1
19
bin/rm/rm.1
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: rm.1,v 1.20 2004/01/11 09:40:36 wiz Exp $
|
||||
.\" $NetBSD: rm.1,v 1.21 2004/03/24 06:55:58 fair Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1993, 1994, 2003
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
|
@ -116,6 +116,22 @@ The
|
|||
utility removes symbolic links, not the files referenced by the links.
|
||||
.Pp
|
||||
It is an error to attempt to remove the files ``.'' and ``..''.
|
||||
.Sh EXAMPLES
|
||||
.Nm
|
||||
uses
|
||||
.Xr getopt 3
|
||||
standard argument processing.
|
||||
Removing filenames that begin with a dash
|
||||
.Pq e.g. Ar -file
|
||||
in the current directory which might otherwise be taken as option flags to
|
||||
.Nm
|
||||
can be accomplished as follows:
|
||||
.Pp
|
||||
.Ic "rm -- -file"
|
||||
.Pp
|
||||
or
|
||||
.Pp
|
||||
.Ic "rm ./-file"
|
||||
.Sh EXIT STATUS
|
||||
The
|
||||
.Nm
|
||||
|
@ -132,6 +148,7 @@ exits with a value \*[Gt]0.
|
|||
.Xr undelete 2 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh BUGS
|
||||
The
|
||||
|
|
Loading…
Reference in New Issue