linux命令之cp,linux04命令之cp

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

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

--backup[=CONTROL]

make a backup of each existing destination file

-blike--backupbut does not accept an argument

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

--copy-contents

copy contents of special files when recursive

-dsame 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,--interactiveprompt before overwrite (overrides a previous-noption)

覆盖文件之前先询问用户

-Hfollow command-line symbolic links in SOURCE

-l,--linklink files instead of copying

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

-P,--no-dereferencenever follow symbolic links in SOURCE

保留源文件或目录的属性

-R,-r,--recursivecopy directories recursively

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

-s,--symbolic-linkmake symbolic links instead of copying

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

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

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

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

-v,--verboseexplain what is being done

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

-x,--one-file-system

stay on this file system

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值