Need card #350 · Relevance Medium · Status New

Confusion between cp -r and -R options and missing documentation

Updated 10/8/2026, 22:05:33

Problem

Users are uncertain about the meaning of cp's -r and -R options, and the lack of clear documentation leads to potential misuse, especially when copying special files, which can cause errors or hangs. Commenters point out historical differences and missing official manuals, urging clearer guidance.

Pain points

Questions to verify

Evidence

quote · @Anonymous
This blog post is odd because it keeps on hinting about a difference between `-r' and `-R' and links to the source code but never actually says what it is.
quote · @Anonymous
Historic versions of the cp utility had an -r option. This implementation supports that option; however, its use is strongly discouraged, as it does not correctly copy special files, symbolic links or FIFOs.
quote · @Anonymous
For those that don't know what 'copy as regular file' means, it means the copy command opens any file as though it was a regular file. If you have a FIFO queue sitting around it will read the content of the FIFO queue - if nothing writes to it, the command will hang. If you do cp -r /dev/zero foo, it will write zeroes into foo until the disk is full. -R otoh will copy a fifo queue as a fifo queue.

Disclaimer: this card is distilled by AI from community discussions as “pain point evidence”. It is a starting point for need analysis and validation, not a “validated market need”. AI has analytical limits; please open the original discussion above to manually verify before key decisions.