`
chenzhou123520
  • 浏览: 4250055 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Linux系统cp: omitting directory `XXX'问题解决

阅读更多

在linux系统中复制文件夹时提示如下:

cp: omitting directory `foldera/'

其中foldera是我要复制的文件夹名,出现该警告的原因是因为foldera目录下还存在目录,所以不能直接拷贝。

 

解决办法:使用递归拷贝,在cp命令后面加上-r参数,形如:

[root@localhost opt]# cp -r foldera folderc

这里的-r代表递归的意思。

 

同样,当我们在linux系统下删除目录时也需要加上-r参数 ,如果目录为空,则会直接删除,如果目录非空,则会级联删除。不过在级联删除时也会有一个问题就是如果目录下存在很多的文件或者子目录,系统会一个一个进行提示。如果想一步删除不用提示的话可以使用rm -rf命令。f是force的意思,代表强制删除,无提示!

分享到:
评论

相关推荐

    Linux中复制目录报错cp-omitting directory的解决办法.docx

    Linux中复制目录报错cp-omitting directory的解决办法.docx

    Linux复制文件命令cp之使用解说

    Linux下的命令有很多,其中有一个命令,我一直使用都存在问题,那就是cp命令了。每次使用该命令,都提示cp:omitting directiory错误。最后百度了一下才明白,原来cp命令复制目录的时候需要带命令参数的。难怪我一...

    avrusb实现数据传输

    I/O pins can be acquired on the ATTiny45 by omitting the external crystal. Instead of a crystal, the internal RC oscillator is used and AVR-USB is configured to run on 16.5 MHz +/- 1% clock rate with ...

    The effect of omitting a limited number of subtests on the full scale reliability of the WISC-R

    The effect of omitting a limited number of subtests on the full scale reliability of the WISC-R T H E EFFECT OF OMITTING A LIMITED NUMBER OF SUBTESTS ON THE FULL SCALE RELIABILITY OF T H E WISC-R ...

    chrome-addon::cloud:将addon上传到Chrome的GitHub动作

    # omitting it will create a new addon extension : abcdefg zip : build/my-addon.zip client-id : ${{ secrets.CHROME_CLIENT_ID }} client-secret : ${{ secrets.CHROME_CLIENT_SECRET }} refresh-token :...

    avisynth:NodeJS 的 Avisynth 绑定

    它目前仅适用于 Windows(如 Avisynth 本身),但理论上有可能通过 Wine 添加 Linux 支持。 安装 npm install -g avisynth 用法 它既可以由脚本使用,也可以从命令行使用(也不需要安装 Avisynth,并且可能对其他...

    python3.6.5参考手册 chm

    PEP 471 - os.scandir() function – a better and faster directory iterator PEP 475: Retry system calls failing with EINTR PEP 479: Change StopIteration handling inside generators PEP 485: A function...

    DIZipWriter v6.2.0 for D7-XE10.1 ZIP 压缩 解压缩

    DIZipWriter is a Delphi component to create PKZip-compatible ZIP ... Omitting this extra step helps DIZipWriter to perform faster and uses less resources than the competition. Advanced Encryption

    firefox-addon::fox:GitHub更新操作创建firefox插件

    Firefox插件动作 该操作会将您的插件发布到Firefox插件商店。 也可以看看 是GitHub上的一个动作,包装了Mozilla的web-ext工具,该工具提供了诸如lint,build... # omitting it will create a new addon uuid : ' {7b3

    WordPress 3 Plugin Development Essentials.pdf

    Omitting the closing "?>" PHP tag 38 A better example: Adding functions 38 Referencing hooks via add_action() and add_filter() 39 Actions versus Filters 40 Exercise—actions and filters 40 ...

    promiseproxy-node:基于ES2015代理的包装器,用于分发Node.js 6 API

    承诺的Node.js API 带有的。 要求 Node.js 6+ 安装 npm install promiseproxy-node 用法 const PromiseProxyNode = ...// Omitting the callback parameter returns a promise fs . chmod ( path , mode ) . then

    glibc ublibc区别

    So our omitting this functionality from uClibc is not a great loss. 的glibc的malloc()实现了行为是可调通过MALLOC_CHECK_环境变量。这主要是用来提供额外的malloc调试功能。这些扩展的malloc调试功能都...

    mp4parser(isoparser).jar

    Muxing audio/video into an MP4 file Append recordings that use same encode settings Adding/Changing metadata Shorten recordings by omitting frames

    Recent Worms A Survey and Trends

    As a result, we found ourselves omitting some of the most notorious worms simply because they lacked any original aspects. It is our hope that others in the community who need to get up to speed in ...

    little-template:使用嵌入在 HTML 中的数据生成带有模板的静态 HTML

    -- Omitting HTML -->{{#template navigationMenu}} {{#var heading}}Navigation{{/var}} {{#list nav}} {{#object}} {{#var href}}/index{{/var}} {{#var name}}Home{{/var}} {{/object}} {{#object}} {{#var ...

    selenium-dotnet-2.45.0.zip

    the fact that omitting this check can cause unrecoverable crashes in the driver, there is demand for a mechanism to disable this check for older, legacy versions of Internet Explorer. Fixes issue #...

    Deep Learning for Search.pdf

    omitting a certain word could cause very relevant information to not show up in the search results. So while I was very proud of my work, I kept wondering how I could have done better to avoid the ...

    Jewels.of.Stringology.PDF

    One of the main aims of the book is to present several of the most celebrated algorithms in a simple way by omitting obscuring details and separating algorithmic structure from combinatorial ...

    Machine Learning for Developers-Packt Publishing(2017).pdf

    In this book we will study the motivations and current techniques of machine learning using code and diagrams as the main conceptual vehicles, omitting outside the fundamental mathematical results. ...

    省略有限数量的子测试对 WISC-R 全量表可靠性的影响

    The effect of omitting a limited number of subtests on the full scale reliability of the WISC-R T H E EFFECT OF OMITTING A LIMITED NUMBER OF SUBTESTS ON THE FULL SCALE RELIABILITY OF T H E WISC-R ...

Global site tag (gtag.js) - Google Analytics