bug-fileutils
[Top][All Lists]
Advanced

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

Re: Change in behavior for cp in fileutils-4.1.1


From: Bob Proulx
Subject: Re: Change in behavior for cp in fileutils-4.1.1
Date: Wed, 14 Nov 2001 18:28:56 -0700

> Thanks for reporting that.
> I've just added this to the NEWS file for 4.1.1:
> 
> * mv (likewise for cp), now fails rather than silently clobbering one of
>     the source files in the following example:
>     rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c
> 
> I'm not sure what behavior would be best in your case:
> 
>   touch a; mkdir d
>   cp a a d

  rm -rf a b c; mkdir a b c; touch a/f b/f; cp a/f b/f c; echo $?
  rm -rf a d; touch a; mkdir d; cp a a d/; echo $?

I will only note that on both IBM AIX and HP-UX both of the above
commands return without failure.

How is 

  cp a/f b/f c/

different from

  cp a/f c/; cp b/f c/

On initial reading it seems inconsistent to treat those cases
differently.

Bob



reply via email to

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