cp 拷贝文件或目录
cp source destination
当source 和 destination 参数都是文件名时,cp命令将源文件复制称一个新文件,并以destination命名。新文件就像权限的文件一样,有新的修改时间。
[root@linux-node1 ~]# cp test-01.txt test-02.txt [root@linux-node1 ~]# ll test-* -rw-r--r-- 1 root root 0 Feb 16 16:11 test-01.txt -rw-r--r-- 1 root root 0 Feb 16 16:17 test-02.txt
参数: -i 操作前确认
-p 保持熟悉
-r 拷贝目录
-a (相当于dpr) 保持熟悉拷贝目录