Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cp(1) — SunOS 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

pr(1)

mv(1)

rcp(1C)

CP(1)  —  User’s Manual — Commands

NAME

cp − copy

SYNOPSIS

cp [ −i ] [ −r ] file1 file2

cp [ −i ] [ −r ] file ... directory

DESCRIPTION

File1 is copied onto file2. The mode and owner of file2 are preserved if it already existed; the mode of the source file is used otherwise. 

In the second form, one or more files are copied into the directory with their original file-names. 

Cp refuses to copy a file onto itself. 

OPTIONS

−i Interactive: prompt the user with the name of the file whenever the copy would overwrite an old file.  Answering with ’y’ means that cp should go ahead and copy the file.  Any other answer will prevent cp from overwriting the file. 

−r Recursive:  if any of the source files are directories, cp copies each subtree rooted at that name; in this case the destination must be a directory. 

EXAMPLES

To make a backup copy of goodies:

% cp goodies old.goodies

To copy an entire directory hierarchy:

% cp −r /usr/wendy/src  /usr/wendy/src/backup

SEE ALSO

cat(1), pr(1), mv(1), rcp(1C)

BUGS

There should be an option to copy ownership, mode, and timestamps to the new files — for instance, when copying a whole hierarchy from one file system to another file system. 

Sun System Release 1.0  —  16 July 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026