This explains whether cp -r and cp -R differ. Early GNU coreutils did treat them differently: a 1992 cp.c commit set '-r' to flag_recursive and flag_copy_as_regular=1, while '-R' set flag_copy_as_regular=0, so behavior diverged. That distinction disappeared around 2002 when the options were merged in GNU coreutils, and modern GNU manuals list them as synonyms: "-R, -r recursive copy directories recursively." In short, current GNU users can expect no difference, and running decades-old coreutils is the only way to observe the original split.
Other Unix-like systems still matter: OpenBSD 7.9 and NetBSD 11 document only -R and discourage -r, and their implementations still maintain separate rflag and Rflag code paths, so behavior may differ there. POSIX has moved to prefer -R, noting -r as historical BSD practice and adding -R for consistency across recursive options in utilities (chown, etc.). Practical takeaway: use -R for cross-platform consistency and compatibility with standards and other tools; -r is legacy and may behave differently on non-GNU systems.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.