Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/cp Sort options. Simplify macro usage. Use standard EXIT...



details:   https://anonhg.NetBSD.org/src/rev/bf308ba7e355
branches:  trunk
changeset: 584186:bf308ba7e355
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sat Sep 10 21:51:57 2005 +0000

description:
Sort options. Simplify macro usage. Use standard EXIT STATUS section.

diffstat:

 bin/cp/cp.1 |  65 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 32 insertions(+), 33 deletions(-)

diffs (112 lines):

diff -r 3f8e93794eb4 -r bf308ba7e355 bin/cp/cp.1
--- a/bin/cp/cp.1       Sat Sep 10 21:51:12 2005 +0000
+++ b/bin/cp/cp.1       Sat Sep 10 21:51:57 2005 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: cp.1,v 1.25 2005/08/15 17:13:35 elad Exp $
+.\"    $NetBSD: cp.1,v 1.26 2005/09/10 21:51:57 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -74,11 +74,28 @@
 .Pp
 The following options are available:
 .Bl -tag -width flag
+.It Fl f
+For each existing destination pathname, attempt to overwrite it.
+If permissions do not allow copy to succeed, remove it and create a new
+file, without prompting for confirmation.
+(The
+.Fl i
+option is ignored if the
+.Fl f
+option is specified.)
 .It Fl H
 If the
 .Fl R
 option is specified, symbolic links on the command line are followed.
 (Symbolic links encountered in the tree traversal are not followed.)
+.It Fl i
+Causes
+.Nm
+to write a prompt to the standard error output before copying a file
+that would overwrite an existing file.
+If the response from the standard input begins with the character
+.Sq Li y ,
+the file copy is attempted.
 .It Fl L
 If the
 .Fl R
@@ -91,35 +108,6 @@
 If the
 .Fl R
 option is specified, no symbolic links are followed.
-.It Fl R
-If
-.Ar source_file
-designates a directory,
-.Nm
-copies the directory and the entire subtree connected at that point.
-This option also causes symbolic links to be copied, rather than
-indirected through, and for
-.Nm
-to create special files rather than copying them as normal files.
-Created directories have the same mode as the corresponding source
-directory, unmodified by the process' umask.
-.It Fl f
-For each existing destination pathname, attempt to overwrite it.
-If permissions do not allow copy to succeed, remove it and create a new
-file, without prompting for confirmation.
-(The
-.Fl i
-option is ignored if the
-.Fl f
-option is specified.)
-.It Fl i
-Causes
-.Nm
-to write a prompt to the standard error output before copying a file
-that would overwrite an existing file.
-If the response from the standard input begins with the character
-.Sq Li y ,
-the file copy is attempted.
 .It Fl p
 Causes
 .Nm
@@ -139,6 +127,18 @@
 and either the user ID or group ID cannot be preserved, neither
 the set user ID or set group ID bits are preserved in the copy's
 permissions.
+.It Fl R
+If
+.Ar source_file
+designates a directory,
+.Nm
+copies the directory and the entire subtree connected at that point.
+This option also causes symbolic links to be copied, rather than
+indirected through, and for
+.Nm
+to create special files rather than copying them as normal files.
+Created directories have the same mode as the corresponding source
+directory, unmodified by the process' umask.
 .It Fl v
 Cause
 .Nm
@@ -159,7 +159,7 @@
 .Pp
 If the destination file does not exist, the mode of the source file is
 used as modified by the file mode creation mask
-.Pf ( Ic umask ,
+.Ic ( umask ,
 see
 .Xr csh 1 ) .
 If the source file has its set user ID bit on, that bit is removed
@@ -194,8 +194,7 @@
 In addition, these options override each other and the
 command's actions are determined by the last one specified.
 .Sh EXIT STATUS
-.Nm
-exits 0 on success, and \*[Gt]0 if an error occurred.
+.Ex -std cp
 .Sh COMPATIBILITY
 Historic versions of the
 .Nm



Home | Main Index | Thread Index | Old Index