cp: Rename -d option to -P
The -d option is a GNU extension and is equivalent to its "-P --preserve=links" options. Since we don't implement the --preserve=links functionality anyway (it means preserve hard links between files), just call it -P, which is specified by POSIX. Additionally, there is no need to check for cp_Pflag again before copying the symlink itself because the only way the mode in the stat will indicate a symlink is if we used lstat (which we only do if -P is specified).
This commit is contained in:
6
cp.1
6
cp.1
@@ -8,7 +8,7 @@ cp \- copy files and directories
|
||||
.RI [ name ]
|
||||
.P
|
||||
.B cp
|
||||
.RB [ \-adpRrv ]
|
||||
.RB [ \-aPpRrv ]
|
||||
.RI [ file ...]
|
||||
.RI [ directory ]
|
||||
.SH DESCRIPTION
|
||||
@@ -21,8 +21,8 @@ they will be copied into the given directory.
|
||||
preserve mode, timestamp, links and permissions.
|
||||
Implies \-d, \-p, \-r.
|
||||
.TP
|
||||
.B \-d
|
||||
don't dereference links. preserve links.
|
||||
.B \-P
|
||||
don't dereference symbolic links.
|
||||
.TP
|
||||
.B \-p
|
||||
preserve mode, timestamp and permissions.
|
||||
|
Reference in New Issue
Block a user