X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: References: <1276042636 DOT 1651 DOT 9 DOT camel AT erebor> Date: Wed, 9 Jun 2010 15:15:54 +1200 Message-ID: Subject: Re: 'cp' utility bug when .exe file exist. From: David Antliff To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Wed, Jun 9, 2010 at 13:38, Julio Costa wrote: > And this is where my head got reeeally spinning... can anyone, please, > explain the reason to why this .exe magic exists, anyway? I can't answer that, but there is a style of symlinks that use .lnk files. Cygwin displays them without that extension, but the actual filename is .lnk so presumably Cygwin has to do some 'lnk-magic' to deal with that. I know it's not the same thing as exe-magic, but it might be related because Cygwin has to hide the "reality" from the user in order for the symlink to work. On Wed, Jun 9, 2010 at 04:21, Corinna Vinschen wrote: > There is. "foo" can mean "foo". or "foo.lnk", or "foo.exe". Cygwin is > handling all these names as being the same file. With symlinks I can understand this, but why match to .exe? Is it because Cygwin allows a user to execute a .exe file without specifying the .exe extension? That is perhaps wrong too - if I want to run foo.exe, I should type ./foo.exe, not ./foo - but ./foo currently works. Then, perhaps this logic was translated into 'cp' (but not 'mv' for some reason?) because people wanted to copy such executables around in the same manner: "cp foo bar" rather than "cp foo.exe bar.exe" - but this seems like merely a 'convenience' for Windows users and not a very good one at that. Oh well, yet another thing I suppose to add to my list of ways Windows has set information technology back decades :-P -- David. -- 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