[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question for cp tools

From: Paul Eggert
Subject: Re: question for cp tools
Date: Fri, 04 Mar 2005 00:15:33 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

>   $ 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'

Hmm, does POSIX allow this behavior?  I just visited
<http://www.opengroup.org/onlinepubs/000095399/utilities/cp.html> and
it gives a pretty-specific algorithm that requires "cp A B D/." to be
equivalent to "cp A D/.; cp B D/.".

Similarly for "mv".

I assume that behavior is in there because somebody got burned one
day, and it seems like a nice feature to have.  But if it doesn't
conform to POSIX, we need to either fix POSIX or change the code

reply via email to

[Prev in Thread] Current Thread [Next in Thread]