bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp creates extraneous directories


From: Bob Proulx
Subject: Re: cp creates extraneous directories
Date: Sat Nov 2 21:14:22 2002
User-agent: Mutt/1.4i

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.

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?

Bob




reply via email to

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