public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
Subject: Re: Copying of symbolic links not working as expected
Date: Sun, 21 Apr 2019 12:20:00 -0000	[thread overview]
Message-ID: <2e4aeaad-10d5-73ee-c49f-797945261b36@cs.umass.edu> (raw)
In-Reply-To: <d2bd014c-9011-907d-157b-baf70d40fdf4@gmail.com>

On 4/21/2019 7:45 AM, Matt D. wrote:
> Note that this creates a chicken-and-the-egg problem when copying paths which contain symbolic links 
> which will be but are not yet valid at the time of copying.
> 
> For example, copying a very large and complex tree with many lots of links will result in a broken 
> copy. I'm trying to copy a directory tree right now and it's a major headache.

Dear Matt - My reading of the cp man page suggests that the
-d flag addresses this issue for cp.

Now tar has these flags available:

-h (--dereference) to follow sym links, and
--hard-dereference to follow hard links

This suggests that tar does not normally follow links.  So I am
less certain what is happening there.

Another program you might consider is rsync.  While I normally
think of it as being for efficient cross-network copying, it
works within a system as well.  It will pay to read through about
its flags before trying to use it for this purpose.

It is true that, compared with Linux, Cygwin symlinks are slightly
funky in that they are true files in the Windows file system, but
with a specific format that Cygwin recognizes as special but Windows
does not.  But that should not generally be noticeable when using
generic Cygwin versions of programs such as these.

Regards - Eliot Moss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-04-21 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 10:07 Matt D.
2019-04-21 11:45 ` Matt D.
2019-04-21 12:20   ` Eliot Moss [this message]
2019-04-21 12:39   ` LRN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e4aeaad-10d5-73ee-c49f-797945261b36@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).