CP.1
上传用户:jnzhq888
上传日期:2007-01-18
资源大小:51694k
文件大小:2k
- .TH CP 1
- .SH NAME
- cp, cpdir - file copy
- .SH SYNOPSIS
- fBcp [fB-pifsmrRvxfR] fIfile1fR fIfile2fRfR
- .br
- fBcp [fB-pifsrRvxfR] fIfilefR ... fIdirectoryfRfR
- .br
- fBcpdir [fB-ifvxfR] fIfile1fR fIfile2fRfR
- .br
- .de FL
- .TP
- \fB\$1\fR
- \$2
- ..
- .de EX
- .TP 20
- \fB\$1\fR
- # \$2
- ..
- .SH OPTIONS
- .FL "-p" "Preserve full mode, uid, gid and times"
- .FL "-i" "Ask before removing existing file"
- .FL "-f" "Forced remove existing file"
- .FL "-s" "Make similar, copy some attributes"
- .FL "-m" "Merge trees, disable the into-a-directory trick"
- .FL "-r" "Copy directory trees with link structure, etc. intact"
- .FL "-R" "Copy directory trees and treat special files as ordinary"
- .FL "-v" "Display what cp is doing"
- .FL "-x" "Do not cross device boundaries"
- .SH EXAMPLES
- .EX "cp oldfile newfile" "Copy fIoldfilefR to fInewfilefR"
- .EX "cp -R dir1 dir2" "Copy a directory tree"
- .SH DESCRIPTION
- .PP
- .I Cp
- copies one file to another, or copies one or more files to a directory.
- Special files are normally opened and read, unless fB-rfP is used.
- fB-rfP also copies the link structure, something fB-RfP doesn't
- care about.
- The fB-sfP option differs from fB-pfP that it only copies the
- times if the target file already exists. A normal copy only copies the
- mode of the file, with the file creation mask applied. Set-uid bits are
- cleared if the owner cannot be set. (The fB-sfP flag does not
- patronize you by clearing bits. Alas fB-sfP and fB-rfP are
- nonstandard.)
- .PP
- .I Cpdir
- is a convenient synonym for fBcp -psmrfP to make a precise copy of
- a directory tree.
- .SH "SEE ALSO"
- .BR cat (1),
- .BR mkdir (1),
- .BR rmdir (1),
- .BR ln (1),
- .BR rm (1).