X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=P6aL6Ip4CG3zK7Mc XhHAKGOsXTny/1B7kpKjiki56eJ7uDnsqR3/44pwn0m6XN8lM4/7rgbcdW4/ebY7 JokJ8AbPFNYLzK5J+YExlfXnLKRSciYLthr+0Rrh7JrOnp9LIz9rGNel7jIBi+WV La5qLYhuIjQhYXftPbvqIdT92aI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=ACtAEZg8QCw8Ie7in9q/VR 8F/xE=; b=BQVxBsw2c4Xh1hjWk6zXkrNucXE2hAkLHnH6vDfu4xGPcxcY8aYi3g g1ActQSqN1eC/dXd7lvP5Kuza8hlWqziKOwA07/AiEFB9Auhnuipsbpc7DV+4Lo6 /aJu1SqxH9zdgCG02CjSd68hCmn9jgasHaR91KFWUpJUET1Qgc9Cs= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_20,SPF_PASS autolearn=ham version=3.3.1 spammy=symbolic, sk:chicken, headache, H*UA:WOW64 X-HELO: mailsrv.cs.umass.edu Reply-To: moss AT cs DOT umass DOT edu Subject: Re: Copying of symbolic links not working as expected To: cygwin AT cygwin DOT com References: From: Eliot Moss Message-ID: <2e4aeaad-10d5-73ee-c49f-797945261b36@cs.umass.edu> Date: Sun, 21 Apr 2019 08:20:44 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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