|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)cp.1 6.2 (Berkeley) 6/8/85
6: .\"
7: .TH CP 1 "June 8, 1985"
8: .UC 4
9: .SH NAME
10: cp \- copy
11: .SH SYNOPSIS
12: .B cp
13: [
14: .B \-ip
15: ] file1 file2
16: .PP
17: .B cp
18: [
19: .B \-ipr
20: ] file ... directory
21: .SH DESCRIPTION
22: .I File1
23: is copied onto
24: .IR file2 .
25: By default, the mode and owner of
26: .I file2
27: are preserved if it already
28: existed; otherwise the mode of the source file modified by the current
29: .IR umask (2)
30: is used. The
31: .B \-p
32: option causes
33: .I cp
34: to attempt to preserve (duplicate) in its copies the modification
35: times and modes of the source files, ignoring the present
36: .IR umask .
37: .PP
38: In the second form, one or more
39: .I files
40: are copied into the
41: .I directory
42: with their original file-names.
43: .PP
44: .I Cp
45: refuses to copy a file onto itself.
46: .PP
47: If the
48: .B \-i
49: option is specified,
50: .I cp
51: will prompt the user with the name of the file
52: whenever the copy will cause an old file to be
53: overwritten. An answer of 'y' will cause
54: .I cp
55: to continue. Any other answer will prevent it
56: from overwriting the file.
57: .PP
58: If the
59: .B \-r
60: option is specified and any of the source files are directories,
61: .I cp
62: copies each subtree rooted at that name; in this case
63: the destination must be a directory.
64: .SH "SEE ALSO"
65: cat(1), mv(1), rcp(1C)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.