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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=br9Xl0dND4plBao5 h4iDmAoHqpsYB3+vYUslnFwEDaN7tIEN+ecRLaS1bnyZa82oNfcUfC/7ta9Cp1B9 WcZv1Tzs6ghgci/zlkYvuHBaK3UI7hNByNHCAa/m52nYFJtWXI9sZ3mA3TA3hzb8 l7eeR7+VkRmlIf9YZua2ZhsqFrQ= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=yXwsXEcnrfHVgOoDW4go5D 30ods=; b=pi7Wc2JJCHFDLCDUJpSDHaJV90FEap/i9x69kOAcBOqs5qbwrzfvU8 BAuXITxMcJDpDg5zHwrzNe91GkL7Yb2UD/Nu9R6H3brenxf+DmtlsdGulJCyQ+e3 VJzvUZUzI68QJ0FcK9NxXiiDonaKqDhrpKKFrjadUx6UWnqJTSVNQ= 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-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:ip*192.168.0.6, yours, Yours, happening X-HELO: mail-it0-f53.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vMVoeamQ9vRtVdGTcw6JD6ObeqxJyEW3Wbph/7bx+V0=; b=nftDTAebsJpSRyQVlXaGM0THHFkNUsBbr/NVNFmQBtLHTENgmJbiETvCc0X51b6vEk vbL/8QILqOM15FOgPXBXb7OoTjEgaFn0HIqLLs8TgDZFvnC+Cn0L1jv/sa2f6bFJqxNE 8t12ZPfaKfKJ0DAZTKelsAaoU8kcQ+BRM82aix86J2//EmjvNXUZ/19W0pAqCsZiPE8u IwdtvjZzlIeFrjuSMFnmwIzzAv1R3BbL9AhhbUUkUaGDNzKyUOytWBCVs9PkpHCood9u piQiarVQYIhnK5oUxMKKs1Y4GpclNfq6PKe2unhZtn8NqQry/UtjiNZIWv5HUH4UbYPT mONQ== X-Gm-Message-State: AODbwcBhDPvawXKYNBXKKn6oBaGeYkVg8YtEwHKkzRIz5y/uW5/rrf/Z d9ZFztRntIKaMuq+ X-Received: by 10.36.37.78 with SMTP id g75mr8443239itg.94.1494681403524; Sat, 13 May 2017 06:16:43 -0700 (PDT) Subject: Re: copying "file.exe" + "file" (a shell script) => targetdir fails To: cygwin AT cygwin DOT com References: <59169826 DOT 3060609 AT tlinx DOT org> From: cyg Simple Message-ID: <3618b40c-9796-d6f8-8802-fdd69116dc25@gmail.com> Date: Sat, 13 May 2017 09:16:43 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <59169826.3060609@tlinx.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 5/13/2017 1:22 AM, L A Walsh wrote: > 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? > As far as I remember it always has. > (I know how to work around this (used move in cmd.exe), Well, there is a different method to work around this: cp -l bin/updatedb. /nbin/ Note the period after the filename; this stops the pseudo symlink from using updatedb.exe because bin/updatedb..exe doesn't exist. > but why can I create a dir but not a file there? > You weren't creating a file there, you were copying a file the file source is getting confused and not the destination. > A bit strange -- guess it isn't often I have both a "file" > and "file.exe" in a dir. > You probably can find something about this via google. Yours isn't the first report. -- cyg Simple -- 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