‹ BackHN Continuity

Thread

cp: -r or -R?

127 points · 110 comments · zdw

  1. 5555watch · · focus · HN ↗
    On a somewhat related note, I really hate that in scp -r and -R mean entirely different things.
    1. pluc · · focus · HN ↗
      The worst is when things behave different when you give them `~/somedir` vs `~/somedir/`. I think it's rsync that does that
      1. IshKebab · · focus · HN ↗
        And `cp`.
        1. brewmarche · · focus · HN ↗
          I remember that macOS/FreeBSD’s cp -R behaves differently depending on the trailing slash (it’s pointed out in the man page). But when I compared with GNU coreutils and busybox they did not, so it’s something to look out for.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.