cp: omitting directory" error explanation and solution

When copying under linux, sometimes there will be an error of cp:omitting directory. For example, cp:omitting directory "bbs" means that there are directories under the bbs directory, which cannot be copied directly.

 

Solution: recursive copy Command: cp  -r  bbs ../backup/bbs Explanation: -r This option means recursion

 

 

Infer from one another: when deleting, there may also be a problem that the following files cannot be deleted. Also use -r to cascade delete

               When chmod grants permissions, you can also use -R to cascade. Note that it is a capital R.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326870767&siteId=291194637