uutils / uutils/coreutils

`man cp` doesn’t document the `-R` option

Open
#6,223 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - cp
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

The manpage for cp/ucp shows the --recursive and -r options for recursive copying, but does not mention -R. All of the following work exactly as expected after running rm -rf directory elsewhere && mkdir directory:

$ "$(brew --prefix uutils-coreutils)"/libexec/uubin/cp -r          directory elsewhere
$                                                  ucp -r          directory elsewhere


$                                                  ucp --recursive directory elsewhere
$ "$(brew --prefix uutils-coreutils)"/libexec/uubin/cp --recursive directory elsewhere


$ "$(brew --prefix uutils-coreutils)"/libexec/uubin/cp -R          directory elsewhere
$                                                  ucp -R          directory elsewhere

but the last two lines use -R, which is undocumented in the manpage, and is the only POSIX-guaranteed option for recursive copying.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/uu/cp/src/cp.rs around lines 475-485, where the documented cp options are defined, and inspect how that text feeds the cp/ucp manpage. Confirm the generated documentation includes -R alongside the recursive options, then run the relevant documentation or cp checks if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.