Linux命令-目录处理命令:cp

cp /etc/grub.conf /tmp  复制一个文件

cp -r /tmp/beijing/dongchengqu /root  复制dongchengqu目录到root目录

cp /root/install.log /root/install.log.syslog /tmp 同时复制多个文件到tmp目录

ls -l /root/install.log  查看源文件的长格式

ls -l /tmp/install.log  查看目标文件的长格式

cp -p /root/install.log /tmp 复制install.log文件到tmp目录中,并且保留源文件的属性信息

cp -r /tmp/beijing/dongchengqu /tmp/东城区 复制dongchengqu目录并更改为中文的目录名称

原文地址:https://www.cnblogs.com/qiyebao/p/4319944.html