delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/05/13/01:28:20

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:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=acd
u6TiXTUIz1DEWtQvN0wZ6nMP4akFcYpERJ03ySg3lpVH9iITQ1gl0PKYOs/GyYsD
Wh1BoWwn9rLb+PecdyRnyRSEWsykqi8hzrY/XR9y2r1v5gyFb8UdN5NyiwaDVBLX
/bWD3n5ABj6pr2guUSzLJvFhupnrAsf/l8EmqbhY=
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:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=Pr5xLf+r9
w4Exq0FiRgmjY1XRxU=; b=eMhS+KORI3GI0+ytr/AhgWtrht5k4Z2xv6wpcyHm+
+rnvdCTEDm73X++gMdWmTCXAK4DeV35BGtKZMBZePAQkCru1Xa5pFH8x2J7Wrfkt
CshlXj29LOnoUjmXAA4DIOT/9qKDL5b/Yq0blO1fY8GAe3aZFp0NxcCeS0UstAwV
ro=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*F:U*cygwin, Hx-languages-length:1516, linda, 10163
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <59169826.3060609@tlinx.org>
Date: Fri, 12 May 2017 22:22:46 -0700
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: copying "file.exe" + "file" (a shell script) => targetdir fails
X-IsSubscribed: yes

I know *why* this is happening (cygwin treating x.exe as x), but
should it do it for shell files too?

sourcedir:
>  ll -di bin/updatedb bin/updatedb.exe
337488497076088359 -rwxrwxr-x+ 1  10163 Apr 12 17:07 bin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 bin/updatedb.exe*
(two different files, different types:)
>  file bin/updatedb{,.exe}
bin/updatedb:     Bourne-Again shell script, ASCII text executable
bin/updatedb.exe: PE32+ executable (console) x86-64, for MS Windows


>  cp -l bin/updatedb /nbin/
cp: cannot create hard link '/nbin/updatedb' to 'bin/updatedb': File exists

cp thinks /nbin/updatedb is the same as /nbin/updatedb.exe (and prevents
copying a real 'updatedb' script into the same place:

(target):
>  ll -i /nbin/updatedb.exe /nbin/updatedb
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 /nbin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 /nbin/updatedb.exe*

But I can create a dir named /nbin/updatedb:

>  mkdir /nbin/updatedb

And now have 2 different inodes in target:

>  ll -di bin/updatedb bin/updatedb.exe
337488497076088359 -rwxrwxr-x+ 1  10163 Apr 12 17:07 bin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 bin/updatedb.exe*

------------

Is this suppose to work this way?

(I know how to work around this (used move in cmd.exe),
but why can I create a dir but not a file there?

A bit strange -- guess it isn't often I have both a "file"
and "file.exe" in a dir.

-linda







--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019