docs/75774: [PATCH] cp documentation fails to mention -R dir/ behavior

Mike Meyer mwm at mired.org
Mon Jan 3 23:40:33 UTC 2005


>Number:         75774
>Category:       docs
>Synopsis:       [PATCH] cp documentation fails to mention -R dir/ behavior
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 03 23:40:27 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Mike Meyer
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
Meyer Consulting
>Environment:
System: FreeBSD guru.mired.org 5.3-STABLE FreeBSD 5.3-STABLE #13: Fri Dec 17 18:32:15 CST 2004 mwm at guru.mired.org:/usr/src/sys/i386/compile/GURU i386


>Description:

When you do "cp -R dir/ target", cp acts as if you did "cp -R dir/*
target". This is undocumented.

>How-To-Repeat:

Try the cp and see. Read the man page.

>Fix:

The attached patch fixes the man page.

--- cp.1-orig	Mon Jan  3 17:32:22 2005
+++ cp.1	Mon Jan  3 17:34:23 2005
@@ -93,6 +93,8 @@
 designates a directory,
 .Nm
 copies the directory and the entire subtree connected at that point.
+If the source_file ends in a /, the contents of the directory
+rather than the directory are copied.
 This option also causes symbolic links to be copied, rather than
 indirected through, and for
 .Nm



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list