The distinction between the -r and -R flags in Unix copy commands has faded over time, though historical differences once existed.
The distinction between the -r and -R flags in Unix copy commands has faded over time, though historical differences once existed. In early GNU coreutils from 1992, the two options carried separate meanings: -r enabled recursive copying while preserving file attributes, whereas -R performed recursive copying without that preservation. By 2002, these differences were merged into a single recursive behavior, rendering the distinction obsolete in modern implementations.
OpenBSD 7.9 now documents only -R in its manual, explicitly discouraging -r usage despite acknowledging subtle behavioral differences in code. NetBSD 11 mirrors this approach, prioritizing consistency across utilities like chown, which recognizes -R but not -r. POSIX 2024 formalizes this hierarchy, designating -R as the standard for recursive operations across compliant tools, while noting -r's historical roots in BSD systems and its deprecated status in current specifications.
This evolution reflects a broader trend toward standardization in Unix-like environments, where consistency across utilities often supersedes legacy conventions. While -r persists in some contexts, its use increasingly risks incompatibility with modern tooling and documentation expectations.
- Publisher
- Hacker News
- Reliability
- high
- Published
- 10/5/2026, 10:00:03 AM
- Retrieved
- 10/5/2026, 10:00:03 AM
- Relevance
- 80%
- Confidence
- 85%

