When you copy a folder on a Linux system, you are prompted as follows:
Shell:
- cp:omitting directory ' foldera/'
Where Foldera is the name of the folder I want to copy, the reason for this warning is that the directory still exists under the Foldera directory, so it cannot be copied directly.
Workaround: Using a recursive copy, add the-r parameter after the CP command, as follows:
Shell:
- [Email protected] opt]# cp-r Foldera FOLDERC
The-R here represents the meaning of recursion.
Similarly, when we delete the directory under the Linux system, we also need to add the-r parameter, if the directory is empty, it will be deleted directly, if the directory is not empty, it will be cascade deleted. However, there is also a problem when cascading delete is that if there are many files or subdirectories under the directory, the system will be prompted one at a time. You can use the RM-RF command if you want to remove it without prompting. F is force's meaning, represents mandatory deletion, no hint!
[Linux] cp:omitting directory ' XXX ' problem solving