cp의 -r과 -R, 34년 전에는 서로 달랐다

cp: -r or -R?

GNU coreutils의 첫 커밋(1992)을 보면 cp의 -r과 -R은 서로 다른 동작을 했다. -r은 파일을 일반 파일로 복사했고 -R은 그러지 않았다. 2002년 두 옵션이 병합되면서 GNU 시스템에서는 차이가 사라졌지만, OpenBSD와 NetBSD는 여전히 -r을 권장하지 않고 -R과 다르게 동작한다. POSIX도 -R 사용을 권장한다.

Earlier versions of this standard included support for the -r option to copy file hierarchies. The -r option is historical practice on BSD and BSD-derived systems. This option is no longer specified by POSIX.1-2024 but may be present in some implementations.

이 날의 다른 글

2026-10-03