📄 cp.1
字号:
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28..TH CP "1" "July 2002" "cp (fileutils) 4.1.10" "User Commands".SH NAMEcp \- copy files and directories.SH SYNOPSIS.B cp[\fIOPTION\fR]... \fISOURCE DEST\fR.br.B cp[\fIOPTION\fR]... \fISOURCE\fR... \fIDIRECTORY\fR.br.B cp[\fIOPTION\fR]... \fI--target-directory=DIRECTORY SOURCE\fR....SH DESCRIPTION.\" Add any additional description here.PPCopy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY..PPMandatory arguments to long options are mandatory for short options too..TP\fB\-a\fR, \fB\-\-archive\fRsame as \fB\-dpR\fR.TP\fB\-\-backup\fR[=\fICONTROL\fR]make a backup of each existing destination file.TP\fB\-b\fRlike \fB\-\-backup\fR but does not accept an argument.TP\fB\-\-copy\-contents\fRcopy contents of special files when recursive.TP\fB\-d\fRsame as \fB\-\-no\-dereference\fR \fB\-\-preserve\fR=\fIlink\fR.TP\fB\-\-no\-dereference\fRnever follow symbolic links.TP\fB\-f\fR, \fB\-\-force\fRif an existing destination file cannot beopened, remove it and try again.TP\fB\-i\fR, \fB\-\-interactive\fRprompt before overwrite.TP\fB\-H\fRfollow command-line symbolic links.TP\fB\-l\fR, \fB\-\-link\fRlink files instead of copying.TP\fB\-L\fR, \fB\-\-dereference\fRalways follow symbolic links.TP\fB\-p\fRsame as \fB\-\-preserve\fR=\fImode\fR,ownership,timestamps.TP\fB\-\-preserve\fR[=\fIATTR_LIST\fR]preserve the specified attributes (default:mode,ownership,timestamps), if possibleadditional attributes: links, all.TP\fB\-\-no\-preserve\fR=\fIATTR_LIST\fRdon't preserve the specified attributes.TP\fB\-\-parents\fRappend source path to DIRECTORY.TP\fB\-P\fRsame as `--no-dereference'.TP\fB\-R\fR, \fB\-r\fR, \fB\-\-recursive\fRcopy directories recursively.TP\fB\-\-remove\-destination\fRremove each existing destination file beforeattempting to open it (contrast with \fB\-\-force\fR).TP\fB\-\-reply=\fR{yes,no,query}specify how to handle the prompt about anexisting destination file.TP\fB\-\-sparse\fR=\fIWHEN\fRcontrol creation of sparse files.TP\fB\-\-strip\-trailing\-slashes\fR remove any trailing slashes from each SOURCEargument.TP\fB\-s\fR, \fB\-\-symbolic\-link\fRmake symbolic links instead of copying.TP\fB\-S\fR, \fB\-\-suffix\fR=\fISUFFIX\fRoverride the usual backup suffix.TP\fB\-\-target\-directory\fR=\fIDIRECTORY\fRmove all SOURCE arguments into DIRECTORY.TP\fB\-u\fR, \fB\-\-update\fRcopy only when the SOURCE file is newerthan the destination file or when thedestination file is missing.TP\fB\-v\fR, \fB\-\-verbose\fRexplain what is being done.TP\fB\-x\fR, \fB\-\-one\-file\-system\fRstay on this file system.TP\fB\-\-help\fRdisplay this help and exit.TP\fB\-\-version\fRoutput version information and exit.PPBy default, sparse SOURCE files are detected by a crude heuristic and thecorresponding DEST file is made sparse as well. That is the behaviorselected by \fB\-\-sparse\fR=\fIauto\fR. Specify \fB\-\-sparse\fR=\fIalways\fR to create a sparse DESTfile whenever the SOURCE file contains a long enough sequence of zero bytes.Use \fB\-\-sparse\fR=\fInever\fR to inhibit creation of sparse files..PPThe backup suffix is `~', unless set with \fB\-\-suffix\fR or SIMPLE_BACKUP_SUFFIX.The version control method may be selected via the \fB\-\-backup\fR option or throughthe VERSION_CONTROL environment variable. Here are the values:.TPnone, offnever make backups (even if \fB\-\-backup\fR is given).TPnumbered, tmake numbered backups.TPexisting, nilnumbered if numbered backups exist, simple otherwise.TPsimple, neveralways make simple backups.PPAs a special case, cp makes a backup of SOURCE when the force and backupoptions are given and SOURCE and DEST are the same name for an existing,regular file..SH AUTHORWritten by Torbjorn Granlund, David MacKenzie, and Jim Meyering..SH "REPORTING BUGS"Report bugs to <bug-fileutils@gnu.org>..SH COPYRIGHTCopyright \(co 2002 Free Software Foundation, Inc..brThis is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE..SH "SEE ALSO"The full documentation for.B cpis maintained as a Texinfo manual. If the.B infoand.B cpprograms are properly installed at your site, the command.IP.B info cp.PPshould give you access to the complete manual.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -