Linux cp一个文件夹时提示cp: omitting directory `test/'

 

将一个文件夹test 复制到地址/opt/tmp下,提示出错:

cp: omitting directory `test/'

原因:

test

目录下还有目录,不能直接进行拷贝。 

我们先找下cp 的命令帮助,输入cp --help .
 

解决方案:使用cp -r test/ /opt/tmp
原文地址:https://www.cnblogs.com/lxwphp/p/9760426.html