Annotation of researchv10dc/man/adm/man1/cp.1, revision 1.1.1.1

1.1       root        1: .TH CP 1 
                      2: .CT 1 files
                      3: .SH NAME
                      4: cp, mv, ln, reccp \- copy, move, or link files
                      5: .SH SYNOPSIS
                      6: .B cp
                      7: [
                      8: .B -z
                      9: ]
                     10: .I file1 file2
                     11: .br
                     12: .B cp
                     13: [
                     14: .B -z
                     15: ]
                     16: .I file ... directory
                     17: .PP
                     18: .B mv
                     19: [
                     20: .B -f
                     21: ]
                     22: .I file1 file2
                     23: .br
                     24: .B mv
                     25: [
                     26: .B -f
                     27: ]
                     28: .I file ... directory
                     29: .PP
                     30: .B ln
                     31: [
                     32: .B -s
                     33: ]
                     34: .I file1 file2
                     35: .br
                     36: .B ln
                     37: [
                     38: .B -s
                     39: ]
                     40: .I file ... directory
                     41: .PP
                     42: .B reccp
                     43: [
                     44: .B -z
                     45: ]
                     46: .I file1 file2
                     47: .br
                     48: .B reccp
                     49: [
                     50: .B -z
                     51: ]
                     52: .I file ... directory
                     53: .SH DESCRIPTION
                     54: In the first form of each command,
                     55: .I file1
                     56: is any name and
                     57: .I file2
                     58: is any name except an existing directory.
                     59: In the second form the command
                     60: copies, moves, or links one or more
                     61: .I files
                     62: into a
                     63: .I directory
                     64: under their original filenames, as if by a sequence of 
                     65: commands in the first form.
                     66: Thus
                     67: .L "mv f1 f2 dir
                     68: is equivalent to
                     69: .LR "mv f1 dir/f1; mv f2 dir/f2" .
                     70: .PP
                     71: .I Cp
                     72: copies the contents of plain
                     73: .I file1
                     74: to
                     75: .IR file2 .
                     76: The mode and owner of  
                     77: .I file2
                     78: are preserved if it already
                     79: exists; the mode of
                     80: .I file1
                     81: is used otherwise.
                     82: .PP
                     83: .I Mv
                     84: moves
                     85: .I file1
                     86: to
                     87: .IR file2 .
                     88: If the two files are in the same file system, the name
                     89: .I file1
                     90: is simply changed to
                     91: .IR file2 ;
                     92: if they are in different file systems,
                     93: .I file1
                     94: is copied and then removed.
                     95: If
                     96: .I file2
                     97: already exists, it is removed before
                     98: .I file1
                     99: is moved.
                    100: In this case the mode of
                    101: .I file2
                    102: is reported if it
                    103: is not writable and the standard input is a terminal.
                    104: Respond
                    105: .L y 
                    106: (and newline) to permit removal.
                    107: .PP
                    108: .I Ln
                    109: links plain
                    110: .I file1
                    111: and
                    112: .IR file2 .
                    113: .I File2
                    114: becomes an alternate name for, and is otherwise
                    115: identical to,
                    116: .I file1.
                    117: .I File2
                    118: must be in the same file system as
                    119: .I file1
                    120: and must not already exist.
                    121: .PP
                    122: .I Reccp
                    123: copies plain files like
                    124: .I cp,
                    125: but copies directories and their contents recursively.
                    126: It attempts to duplicate linkage and dates.
                    127: When run by the super-user, it preserves ownership
                    128: and copies device files as device files.
                    129: .PP
                    130: The options are:
                    131: .TP
                    132: .B -z
                    133: Preserve `holes'; see
                    134: .IR lseek (2).
                    135: .TP
                    136: .B -f
                    137: Forcibly remove
                    138: .IR file2 
                    139: without asking.
                    140: .TP
                    141: .B -s
                    142: Make symbolic links:
                    143: record the (arbitrary) name
                    144: .I file1
                    145: in 
                    146: .I file2.
                    147: Except in special cases, such as
                    148: .IR rm (1)
                    149: and
                    150: .I lstat
                    151: (see
                    152: .IR stat (2)),
                    153: subsequent references to 
                    154: .I file2
                    155: are treated as references to
                    156: .IR file1 .
                    157: See
                    158: .IR link (2)
                    159: for details.
                    160: .SH EXAMPLES
                    161: .TP
                    162: .B mkdir /usr1/ken; cp /usr/ken/* /usr1/ken
                    163: Place in 
                    164: .B /usr1/ken
                    165: copies of all files from
                    166: .BR /usr/ken .
                    167: .TP
                    168: .B reccp /usr/ken /usr1
                    169: .br
                    170: .ns
                    171: .TP
                    172: .B mkdir /usr1/ken; reccp /usr/ken/* /usr1/ken
                    173: Two ways to duplicate in
                    174: .B /usr1/ken
                    175: the whole file hierarchy from
                    176: .BR /usr/ken .
                    177: .SH "SEE ALSO"
                    178: .IR cat (1),
                    179: .IR link (2),
                    180: .IR stat (2),
                    181: .IR push (1),
                    182: .IR uucp (1),
                    183: .IR rcp (1),
                    184: .IR cpio (1)
                    185: .SH DIAGNOSTICS
                    186: .I Cp,
                    187: .I mv,
                    188: and
                    189: .I reccp
                    190: refuse to copy or move files onto themselves or directories into themselves.
                    191: .SH BUGS
                    192: .I Mv
                    193: to a different file system is imperfect: if
                    194: .I file1
                    195: is a plain file links to it are broken; if it is a
                    196: directory, nothing happens.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.