This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: BUG: 'cp -f ...' create an dir instead of a copy of e file!
- From: Larry Hall <lh-no-personal-replies-please at cygwin dot com>
- To: "ErWagner" <erhard dot wagner at wagner-systems dot de>, cygwin at cygwin dot com
- Date: Fri, 06 Aug 2004 09:14:14 -0400
- Subject: Re: BUG: 'cp -f ...' create an dir instead of a copy of e file!
- References: <cevpo9$una$1@sea.gmane.org>
- Reply-to: Cygwin List <cygwin at cygwin dot com>
At 07:23 AM 8/6/2004, you wrote:
>My actual revision Cygwin runs under
>Windows NT Ver 4.0 Build 1381 Service Pack 6
>shell: BASH 2.05b
>
>cp doesn't work correct
>if the destination file do not exist the result is what I expect
>
># result if y.log do not exist
>$ cp -f x.log y.log
>$ ls
>-rw-rw-rw- 1 ???????? ???????? 30 Aug 4 18:14 y.log
>
># result if y.log already exist!
>$ cp -f x.log y.log
>cp: overwrite `y.log'? y
>cp: writing `y.log': Invalid request code
>$ ls
>drwxrwxrwx+ 2 ???????? ???????? 0 Aug 4 18:13 y.log/
>
># this works fine
>$ cp --remove-destination x.log y.log
Seems to me you 'cp' is not what you think. The procedure you outlined
above works fine for me (on W2K). Given that you're being prompted in
the overwrite case, I can only assume that your 'cp' is aliased to 'cp -i'
or something. If that's the case, I'm wondering what else about the
command is not as expected in your environment. If you're looking for
the "quick resolution", I suggest you add in the '-v' flag and see what
it tells you. I would also get rid of any alias, cover script, or what-
have-you. Running this all under 'strace' might give you some clue,
assuming you're running the Cygwin 'cp' (which is another good thing to
check). If you're still having problems after all this, please visit,
read, and follow <http://cygwin.com/problems.html>. This has guidelines
for required and requested info when reporting problems. It's clear that
things on your system aren't entirely correct given the fact that none of
your files have owners and groups that can be displayed. This could be
related to the problems you're having with 'cp'.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (508) 893-9889 - FAX
Holliston, MA 01746
--
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/