2015-03-27 16:22:48 +00:00
|
|
|
.Dd March 27, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt CP 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-30 21:07:17 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm cp
|
|
|
|
.Nd copy files and directories
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2015-02-17 16:13:45 +00:00
|
|
|
.Op Fl afpv
|
|
|
|
.Oo
|
|
|
|
.Fl R
|
|
|
|
.Op Fl H | L | P
|
|
|
|
.Oc
|
2015-03-02 18:15:19 +00:00
|
|
|
.Op Ar source ...
|
|
|
|
.Op Ar dest
|
2015-01-30 21:07:17 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-03-02 18:15:19 +00:00
|
|
|
copies
|
|
|
|
.Ar source
|
|
|
|
to
|
|
|
|
.Ar dest .
|
|
|
|
If more than one
|
|
|
|
.Ar source
|
|
|
|
is given
|
|
|
|
.Ar dest
|
|
|
|
has to be a directory.
|
2015-01-30 21:07:17 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl a
|
2015-03-02 18:15:19 +00:00
|
|
|
Preserve block devices, character devices, sockets and FIFOs. Implies
|
|
|
|
.Fl p ,
|
|
|
|
.Fl P
|
2015-01-30 21:07:17 +00:00
|
|
|
and
|
2015-03-02 18:15:19 +00:00
|
|
|
.Fl R .
|
2015-02-01 19:52:28 +00:00
|
|
|
.It Fl f
|
2015-03-02 18:15:19 +00:00
|
|
|
If an existing
|
|
|
|
.Ar dest
|
|
|
|
cannot be opened, remove it and try again.
|
2015-02-17 16:13:45 +00:00
|
|
|
.It Fl p
|
|
|
|
Preserve mode, timestamp and permissions.
|
|
|
|
.It Fl v
|
2015-03-02 18:15:19 +00:00
|
|
|
Write "'source' -> 'dest'" for each
|
|
|
|
.Ar source
|
|
|
|
to stdout.
|
2015-02-09 21:11:06 +00:00
|
|
|
.It Fl H
|
2015-03-02 18:15:19 +00:00
|
|
|
Dereference
|
|
|
|
.Ar source
|
|
|
|
if it is a symbolic link.
|
2015-02-09 21:11:06 +00:00
|
|
|
.It Fl L
|
2015-03-02 18:15:19 +00:00
|
|
|
Dereference all symbolic links.
|
|
|
|
This is the default.
|
2015-01-30 21:07:17 +00:00
|
|
|
.It Fl P
|
2015-03-02 18:15:19 +00:00
|
|
|
Preserve symbolic links.
|
|
|
|
.It Fl R
|
|
|
|
Traverse directories recursively. If this flag is not specified, directories
|
|
|
|
are not copied.
|
2015-01-30 21:07:17 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mv 1
|
2015-03-02 18:15:19 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 16:22:48 +00:00
|
|
|
.St -p1003.1-2013
|
2015-03-02 18:15:19 +00:00
|
|
|
specification except from the
|
|
|
|
.Op Fl i
|
|
|
|
flag.
|
|
|
|
.Pp
|
2015-03-27 16:22:48 +00:00
|
|
|
The
|
2015-03-02 18:15:19 +00:00
|
|
|
.Op Fl av
|
2015-03-27 16:22:48 +00:00
|
|
|
flags are an extension to that specification.
|