Bug 235438 - cp -R command not working properly
Summary: cp -R command not working properly
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-02 20:59 UTC by Ioannis Vranos
Modified: 2019-03-18 06:50 UTC (History)
2 users (show)

See Also:


Attachments
It shows the cp -R directory bug (110.08 KB, image/png)
2019-02-02 20:59 UTC, Ioannis Vranos
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Vranos 2019-02-02 20:59:31 UTC
Created attachment 201655 [details]
It shows the cp -R directory bug

The command cp -R  has a bug when copying.

An example:

cp -R  Downloads  Downloads

produces a recursive copying, until it reaches some recursion limits.


See the screenshot attached.


It should follow the Linux cp -R behaviour:

Create only one copy of the directory, in itself, and then quit.
Comment 1 Bob Bishop 2019-02-06 23:07:32 UTC
POSIX apparently allows the current behaviour but it does not seem sensible.

The proposed alternative seems reasonable.