[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question for cp tools
From: |
Jim Meyering |
Subject: |
Re: question for cp tools |
Date: |
Thu, 03 Mar 2005 09:34:05 +0100 |
¤´Æ <address@hidden> wrote:
> Hello. I have a question for cp tools.
>
> CP tool is so convenient for make processing, but I¡¯ve had trouble with
> copying some files.
>
> cp: will not overwrite just-created `../../1H/uimdrv.h' with
> `../../services/uim/uimdrv.h'
>
> cp: will not overwrite just-created `../../1H/sisdecoder.h' with
> `../../midp/sisdecoder.h'
That is a feature of cp that is designed to prevent
accidental data loss in a case like yours:
$ mkdir a b c
$ touch {a,b}/important.h
$ cp a/*.h b/*.h c
cp: will not overwrite just-created `c/important.h' with `b/important.h'
So, you have at least two pairs of header files with the same name
but in different directories.
If you really want to use only one copy of such a file (maybe they're
identical), you can use cp's --backup option, and you'll find important.h
and important.h~ in the destination directory. However, it's almost
always better to avoid having identically-named files.