|
From: | Padraig Brady |
Subject: | Re: cp creates extraneous directories |
Date: | Mon Nov 4 11:52:36 2002 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827 |
address@hidden wrote:
Padraig Brady <address@hidden> [2002-10-14 14:58:23 +0100]:$ cp --version cp (fileutils) 4.1 $ mkdir test $ cd test $ touch f1 $ mkdir t $ cd t $ cp -a ../* . # extra t level is created?A very good test case! Yes. But is it a bug since you did ask to copy that directory? I think that because you specifically requested cp to copy that directory that the creation of that directory would be expected.
Hmm?
I say specifically requested because if you use echo to see what the file glob matches you will see that directory on the comand line. mkdir test cd test mkdir t cd t ls -l .. echo cp -a ../* . The output shows: cp -a ../t . If it did not create the directory wouldn't that be a bug?
Well it's at least inconsistent. Why does it say "can't copy directory to itself" when it actually does. Pádraig.
[Prev in Thread] | Current Thread | [Next in Thread] |