summaryrefslogtreecommitdiff
path: root/bin/mv/mv.1
diff options
context:
space:
mode:
authorHeikki Korpela <heko@cvs.openbsd.org>2001-08-13 21:00:06 +0000
committerHeikki Korpela <heko@cvs.openbsd.org>2001-08-13 21:00:06 +0000
commit9c41801b72d10c481b58bf23758a0468295df595 (patch)
tree11bf03fdaa87c137d54b50619cbde2c796f37c93 /bin/mv/mv.1
parent03c9bddb9308a1b95d909bbee2140f4a0d15acf8 (diff)
Document how to remove or rename a file that is a getopt(3) flag
to mv(1) or rm(1) by preceding it with --. From ho@: Also give a sample of the ./-f way that is more portable ok millert@, ho@
Diffstat (limited to 'bin/mv/mv.1')
-rw-r--r--bin/mv/mv.113
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/mv/mv.1 b/bin/mv/mv.1
index 98fee2d56ef..70099cbe08f 100644
--- a/bin/mv/mv.1
+++ b/bin/mv/mv.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mv.1,v 1.12 2000/11/09 17:51:57 aaron Exp $
+.\" $OpenBSD: mv.1,v 1.13 2001/08/13 21:00:05 heko Exp $
.\" $NetBSD: mv.1,v 1.8 1995/03/21 09:06:51 cgd Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
@@ -134,6 +134,17 @@ to
overwriting
.Pa bar
if it already exists.
+.Pp
+.Cm mv -i -- -f bar ,
+.Cm mv -i ./-f bar
+.Pp
+Either of these commands will rename the file
+.Pa -f
+to
+.Pa bar ,
+prompting for confirmation if
+.Pa bar
+already exists.
.Sh SEE ALSO
.Xr cp 1 ,
.Xr symlink 7