Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



CP(1)           DOMAIN/IX Reference Manual (SYS5)           CP(1)



NAME
     cp, ln, mv - copy, link, or move files

USAGE
     cp file1 [ file2 ... ] target
     ln [ -f ] file1 [ file2 ... ] target
     mv [ -f ] file1 [ file2 ... ] target

DESCRIPTION
     Cp, ln, and mv respectively copy, link, and move files to a
     specified target.  Under no circumstances can any of the
     files being manipulated be the same as the target, so take
     care when using sh (1) metacharacters.  If target is a
     directory, then one or more files are copied, linked, or
     moved to that directory.  If target is a file, its contents
     are destroyed.

     If mv or ln determines that the mode of target forbids writ-
     ing, it prints the mode, asks for a response, and reads the
     standard input for one line.  If the line begins with y, the
     move or link occurs, if permissible; if not, the command
     exits.  It asks no questions and does the move or link when
     the -f option is used, or if the standard input is not a
     terminal.

     Only mv allows file1 to be a directory, in which case the
     directory rename occurs only if the two directories have the
     same parent; file1 is renamed target. If file1 is a file and
     target is a link to another file with links, the other links
     remain and target becomes a new file.  If target is not a
     file, cp creates a new file with the same mode as file1
     (except that it will not set the sticky bit unless the
     super-user is executing the command).  The owner and group
     of target are those of the user.  If target is a file, copy-
     ing a file into target does not change its mode, owner, or
     group.  Cp sets the last modification time of target (and
     last access time, if target did not exist).  It also sets
     the last access time of file1 to the time the copy was made.
     If target is a link to a file, all links remain and the file
     is changed.

CAUTIONS
     The System V version of the ln command creates only hard
     links, which point directly to an object (file).  The AEGIS
     CRL command, however, creates soft links that point to link
     text or an object's pathname. For example, suppose you use
     the System V version of ln to create a link to a file.
     Then, you modify the file.  A new version of the file now
     exists.  The System V link continues to point to the origi-
     nal file.  If, on the other hand, you use CRL to create a
     link to a file, and you then modify the file, the link text
     always points to the latest version of the file.  Note that



Printed 6/10/85                                              CP-1





CP(1)           DOMAIN/IX Reference Manual (SYS5)           CP(1)



     the BSD4.2 version can create both hard and soft links.

     If file1 and target lie on different file systems, mv must
     copy the file and delete the original.  In this case, any
     linking relationship with other files is lost.

RELATED INFORMATION
     chmod (1), cpio (1), rm (1).















































CP-2                                              Printed 6/10/85



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