V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Livid
270.9D
571.63D
V2EX  ›  Linux

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

  •  
  •   Livid ·
    PRO
    · Jan 4, 2013 · 8463 views
    This topic created in 4870 days ago, the information mentioned may be changed or developed.
    4 replies    1970-01-01 08:00:00 +08:00
    SErHo
        1
    SErHo  
       Jan 4, 2013
    man cp 中有讲解。就是对非目录文件的处理差别。
    adeba
        2
    adeba  
       Jan 4, 2013
    在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  
       Jan 4, 2013
    推荐用-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  
       Jan 4, 2013
    忘记说了, 在mac下man的cp
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1198 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:14 · PVG 07:14 · LAX 16:14 · JFK 19:14
    ♥ Do have faith in what you're doing.