cp.1 (1089B)
1 .Dd April 22, 2025 2 .Dt CP 1 3 .Os sbase 4 .Sh NAME 5 .Nm cp 6 .Nd copy files and directories 7 .Sh SYNOPSIS 8 .Nm 9 .Op Fl afipv 10 .Oo 11 .Fl R 12 .Op Fl H | L | P 13 .Oc 14 .Ar source ... 15 .Ar dest 16 .Sh DESCRIPTION 17 .Nm 18 copies 19 .Ar source 20 to 21 .Ar dest . 22 If more than one 23 .Ar source 24 is given 25 .Ar dest 26 has to be a directory. 27 .Sh OPTIONS 28 .Bl -tag -width Ds 29 .It Fl a 30 Preserve block devices, character devices, sockets and FIFOs. 31 Implies 32 .Fl p , 33 .Fl P 34 and 35 .Fl R . 36 .It Fl f 37 If an existing 38 .Ar dest 39 cannot be opened, remove it and try again. 40 .It Fl i 41 Interactive prompt before overwrite. 42 .It Fl p 43 Preserve mode, timestamp and permissions. 44 .It Fl v 45 Write "'source' -> 'dest'" for each 46 .Ar source 47 to stdout. 48 .It Fl H 49 Dereference 50 .Ar source 51 if it is a symbolic link. 52 .It Fl L 53 Dereference all symbolic links. 54 This is the default without 55 .Fl R . 56 .It Fl P 57 Preserve symbolic links. 58 This is the default with 59 .Fl R . 60 .It Fl R 61 Traverse directories recursively. 62 If this flag is not specified, directories are not copied. 63 .El 64 .Sh SEE ALSO 65 .Xr mv 1 66 .Sh STANDARDS 67 POSIX.1-2013. 68 .Pp 69 The 70 .Op Fl av 71 flags are an extension to that specification.