CP(1) CP(1) NAME cp, mv, rename - copy, move files SYNOPSIS cp [ -z [ bufsize ] ] file1 file2 cp [ -z [ bufsize ] ] file ... directory mv file1 file2 mv file ... directory DESCRIPTION In the first form file1 is any name and file2 is any name except an existing directory. In the second form the com- mands copy or move one or more files into a directory under their original file names, as if by a sequence of commands in the first form. Thus `cp f1 f2 dir' is equivalent to `cp f1 dir/f1; cp f2 dir/f2'. Cp copies the contents of plain file1 to file2. The mode and owner of file2 are preserved if it already exists; the mode of file1 is used otherwise. The -z option says to preserve `holes'; see seek(2). The reads and writes are done in hunks of size bufsize. Mv moves file1 to file2. If the files are in the same direc- tory, file1 is just renamed; otherwise mv behaves like cp. Mv will rename directories, but it refuses to move a direc- tory into another directory. SEE ALSO cat(1), stat(2), push(1) DIAGNOSTICS Cp and mv refuse to copy or move files onto themselves. Page 1 Plan 9 (printed 11/18/24)