V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Livid
V2EX  ›  Linux

GNU 的 cp 指令 -r 和 -R 有任何不同么?

  •  
  •   Livid · 2013-01-04 20:37:27 +08:00 · 7489 次点击
    这是一个创建于 4101 天前的主题,其中的信息可能已经有所发展或是发生改变。
    4 条回复    1970-01-01 08:00:00 +08:00
    SErHo
        1
    SErHo  
       2013-01-04 20:42:17 +08:00
    man cp 中有讲解。就是对非目录文件的处理差别。
    adeba
        2
    adeba  
       2013-01-04 20:52:37 +08:00
    在Linux,GNU和BusyBox的cp-r和-R的实现是相同的。
    More reference: http://unix.stackexchange.com/questions/18712/difference-between-cp-r-and-cp-r-copy-command
    hewigovens
        3
    hewigovens  
       2013-01-04 20:52:54 +08:00
    推荐用-R, 能够正确处理符号链接等, -r是为了兼容之前版本而保留的. Historic versions of the cp utility had a -r option. This implementation supports that option; however, its use is strongly discouraged, as it does not correctly copy special files, symbolic links, or fifo's.
    hewigovens
        4
    hewigovens  
       2013-01-04 20:53:32 +08:00
    忘记说了, 在mac下man的cp
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5337 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 07:11 · PVG 15:11 · LAX 00:11 · JFK 03:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.