[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp 4.1 problem

From: Bob Proulx
Subject: Re: cp 4.1 problem
Date: Thu, 14 Feb 2002 10:00:04 -0700

> cp 4.0 command cp -R /dir /destdir would copy the files to which the links
> point. However 4.1 just copies the links. Might this be a bug?

I know Jim has changes in the testing code tracks for 'cp -[rR]'.  The
curent version is 4.1.5 and the version with changes pending will be
later than that version.  Stay tuned to the announcements and keep an
eye on the web page where the latest testing release will be updated.
One is expected in the next few weeks.


Other random notes on this...

The SUSv2 says that -r is implementation dependent for special files
and that "-R option is intended to recreate the file hierarchy"
without specifying specific behavior for symlinks.

Which is the correct behavior for symlinks when recursively copying

The man page (generated from the online --help of cp) says

       -a, --archive
              same as -dpR

Which includes -d as well as -R and therefore implies that -R does not
include the functionality of the -d option.  The -d option is "never
follow symbolic links".  The 'info' documentation says:

     By default, `cp' follows symbolic links only when not copying
  recursively.  This default can be overridden with the
  `--no-dereference' (`-d'), `--dereference' (`-L'), and `-H' options.
  If more than one of these options is specified, the last one silently
  overrides the others.

Which says that if copying recursively -[rR] that symlinks should be
copied as symlinks.  There are some conflicts in the documentation.
This is all from fileutils-4.1.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]