Linux cp: omittingdirectory 'XXX' problem solving

Source: Internet
Author: User
In Linux, cp: omittingdirectory 'XXX & amp; #39; problem solving: when copying folders in linux, the following prompt is displayed: Shell code cp: omittingdirectory 'foldera/& amp; #39; here, foldera is the name of the folder to be copied. The cause of this warning is folde...
In Linux, when copying a folder in linux, the following prompt is displayed: Shell code cp: omitting directory 'foldera/'where foldera is the name of the folder to be copied. The cause of this warning is that there is still a directory in the foldera directory, so you cannot copy it directly. Www.2cto.com solution:
Use recursive copy and add the-r parameter after the cp command, for example, Shell Code [root @ localhost opt] # cp-r foldera folderc. here-r indicates recursion. Similarly, when we delete a directory in linux, 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 cascading deletion. However, when you perform cascading deletion, the system will prompt you one by one if there are many files or subdirectories in the directory. You can use the rm-rf command if you do not need to delete the file in one step. F indicates force, which indicates force deletion. no prompt is displayed! Author: chenzhou123520

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.