linux04命令之cp

-a,--archive-T,--no-target-directory    same as-dR--preserve=all

相当于 -pdr 的意思(参数pdr分别为:保留权限,复制软链接本身,递归复制);

--backup[=CONTROL]

make a backup of each existing destination file

-b  like--backup but does not accept an argument

删除、覆盖目的文件先备份,备份的文件或目录亦建立为符号链接,并指向源文件或目录链接的源文件或目录。假如没有加上这个参数,在复制过程中若遇到符号链接,则会直接复制源文件或目录

--copy-contents

copy contents of special files when recursive

-d same as--no-dereference--preserve=links

-f ,--forceif an existing destination file cannot be opened, remove itand

try again (redundant if the-noption is used)

强行复制文件或目录, 不论目的文件或目录是否已经存在

-i,--interactive prompt before overwrite (overrides a previous-noption)

覆盖文件之前先询问用户

-H follow command-line symbolic links in SOURCE


-l,--link   link files instead of copying

对源文件建立硬链接,而非复制文件

-P,--no-dereference  never follow symbolic links in SOURCE

保留源文件或目录的属性

-R,-r,--recursivecopy directories recursively

递归处理,将指定目录下的文件与子目录一并处理。若源文件或目录的形态,不属于目录或符号链接,则一律视为普通文件处理

-s,--symbolic-link make symbolic links instead of copying


-S,--suffix=SUFFIX  override the usual backup suffix

在备份文件时,用指定的后缀“SUFFIX”代替文件的默认后缀;

-u,--update copyonlywhentheSOURCE file is newer than the destination file or when the destination file is missing

使用这项参数之后,只会在源文件的修改时间(Modification Time)较目的文件更新时,或是名称相互对应的目的文件并不存在,才复制文件

-v,--verbose  explain what is being done

详细显示命令执行的操作。

-x,--one-file-system  

stay on this file system

你可能感兴趣的:(linux04命令之cp)