From 9c41801b72d10c481b58bf23758a0468295df595 Mon Sep 17 00:00:00 2001 From: Heikki Korpela Date: Mon, 13 Aug 2001 21:00:06 +0000 Subject: 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@ --- bin/mv/mv.1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bin/mv/mv.1') 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 -- cgit v1.2.3