Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Sat, 9 Jun 2001 15:54:21 +0300
Message-Id: <200106091254.PAA21647@linux.>
From: "Ehud Karni" <ehud@unix.simonwiesel.co.il>
To: kerry@bytedesigns.com
Subject: Re: Problem with system commands: cp and mv
CC: cygwin@cygwin.com
In-reply-to: <04e701c0f076$66326600$c600a8c0@kssony> (message from Kerry
	Sanger on Fri, 8 Jun 2001 16:54:01 -0700)
Organization: Simon & Wiesel Insurance agency
Reply-to: ehud@unix.simonwiesel.co.il
References:  <04e701c0f076$66326600$c600a8c0@kssony>
X-Mailer: Emacs 20.7.1 rmail (send-msg 1.104)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-8
Content-Transfer-Encoding: 7bit

On Fri, 8 Jun 2001 16:54:01 -0700, Kerry Sanger <kerry@bytedesigns.com> wrote:
> 
> I can't cp or mv any simple executable..example:
> 
>      simple C program - expire.c
> 
>      compile and link expire.c:
>     
>             gcc -c -I. expire.c
>             gcc expire.o -o expire
> 
>      from the current directory where the expire
>      executable exists and where a subdirectory util
>      exists:                  cp expire util/
>     -or-                      cp expire util/expire
>     -or-                      mv expire util/
>     -or-                      mv expire util/expire
> 
>      all return: 'expire and util/expire are the same file'..eh?
>      there is no util/expire..so what's it seeing/comparing? 
> 
>      I can cp or mv any other flat file or library ( .a ) I've
>      created to util..just not any of the executables.
> 
>      cygwin seems to think the current path and the
>      current path/util are the same as though I were 
>      attempting: cp expire ./expire
>      ( in which case I would expect the error:
>          expire and expire are the same file ).
> 
>      I can go to a dos window and:
> 
>        copy dcheck.exe util
> -or- copy dcheck.exe util\
> -or- copy dcheck.exe util\dcheck 

I verified the problem on W98 too.
It also occurs with hardlink (ln) but not with symbolic link (ln -s)
presumably because `ln -s' does not check file existence.

A very easy solution (workaround ?) is to use the file name with the
.exe extension (checked\).

e.g. In your case: cp expire.exe util/   -or-   mv expire.exe util)

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-6212-757 Fax: +972-3-6292-544   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:ehud@unix.simonwiesel.co.il    http://www.simonwiesel.co.il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

