aboutsummaryrefslogtreecommitdiff
path: root/bin/cp/cp.1
diff options
context:
space:
mode:
authorJohan Karlsson <johan@FreeBSD.org>2002-07-23 00:42:56 +0000
committerJohan Karlsson <johan@FreeBSD.org>2002-07-23 00:42:56 +0000
commit786c276fe46c293542910ed7293d638aca352f42 (patch)
tree49671495a38f4cacd1e75c9f73f7e469e9ee79ec /bin/cp/cp.1
parent61a875d706aa6542436c2b262b873763d3dbc5a9 (diff)
downloadsrc-786c276fe46c293542910ed7293d638aca352f42.tar.gz
src-786c276fe46c293542910ed7293d638aca352f42.zip
Add the -n option, which automatically answers "no" to the overwrite question.
PR: 7828 Suggested by: Daniel O'Connor <doconnor@gsoft.com.au> Approved by: sheldonh (mentor) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=100538
Diffstat (limited to 'bin/cp/cp.1')
-rw-r--r--bin/cp/cp.121
1 files changed, 18 insertions, 3 deletions
diff --git a/bin/cp/cp.1 b/bin/cp/cp.1
index c682ae188f00..5c83a9acf246 100644
--- a/bin/cp/cp.1
+++ b/bin/cp/cp.1
@@ -47,7 +47,7 @@
.Fl R
.Op Fl H | Fl L | Fl P
.Oc
-.Op Fl f | i
+.Op Fl f | i | n
.Op Fl pv
.Ar source_file target_file
.Nm
@@ -55,7 +55,7 @@
.Fl R
.Op Fl H | Fl L | Fl P
.Oc
-.Op Fl f | i
+.Op Fl f | i | n
.Op Fl pv
.Ar source_file ... target_directory
.Sh DESCRIPTION
@@ -121,6 +121,8 @@ regardless of its permissions.
.Fl f
option overrides any previous
.Fl i
+or
+.Fl n
options.)
.It Fl i
Cause
@@ -136,6 +138,17 @@ the file copy is attempted.
.Fl i
option overrides any previous
.Fl f
+or
+.Fl n
+options.)
+.It Fl n
+Do not overwriting an existing file.
+(The
+.Fl n
+option overrides any previous
+.Fl f
+or
+.Fl i
options.)
.It Fl p
Cause
@@ -226,7 +239,9 @@ or fifo's.
.Pp
The
.Fl v
-option is non-standard and its use in scripts is not recommended.
+and
+.Fl n
+options are non-standard and their use in scripts is not recommended.
.Sh SEE ALSO
.Xr mv 1 ,
.Xr rcp 1 ,