delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/19/17:45:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
From: Robert R Schneck-McConnell <schneck AT math DOT berkeley DOT edu>
Subject: Re: cp and "are the same file"
Date: Sun, 19 Dec 2004 22:44:42 +0000 (UTC)
Lines: 24
Message-ID: <cq508p$peq$1@sea.gmane.org>
References: <Pine DOT LNX DOT 4 DOT 43 DOT 0412171623030 DOT 21256-100000 AT pilchuck DOT reedmedia DOT net>
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: 206-15-138-156.dialup.ziplink.net
User-Agent: slrn/0.9.8.0 (CYGWIN_NT-5.1)
X-IsSubscribed: yes

Jeremy C. Reed wrote:
> Anyways, I want to cp to magically see the .exe and copy correctly.
>
> Example of error:
>
>  cp: `/home/jreed/tmp/bmake/bmake' and `/home/jreed/pkg/bin/bmake' are the
>  same file
>
> "are the same file" is the wrong message.

This won't be fixed until someone volunteers to maintain coreutils.

However, in the fileutils source tarball there are three files:
  copy.c  copy.c.cgf  copy.c.orig

If you replace "copy.c" with either of the other two and rebuild, you 
get a "cp" which does have special handling for the .exe extension.

Apparently, it was felt that it was too dangerous to have "cp" behave 
this way by default.  For instance, someone could really want to copy 
"foo" to "bar", and end up overwriting "bar.exe" because only "foo.exe" 
existed.  This is pretty far-fetched, I think.

Robert


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

- Raw text -


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