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