bug in cp -r command

2009-07-13 Thread Sourav Chakraborty
Cp -r does not work if wild card entries are specified. Basically, it copies
all files, and ignores the wildcard entries.

cp -r /directory/you/want/to/copy/from/*.ext /new/destination copies all
files to destination instead of only *.ext files. I think this is a serious
bug and should be remedied immediately.

Thanks.
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: bug in cp -r command

2009-07-13 Thread Philip Rowlands

On Mon, 13 Jul 2009, Sourav Chakraborty wrote:


Cp -r does not work if wild card entries are specified. Basically, it copies
all files, and ignores the wildcard entries.


cp doesn't know about wildcards; they are a shell construct. Please see 
the FAQ at http://tinyurl.com/59ovg



cp -r /directory/you/want/to/copy/from/*.ext /new/destination copies all
files to destination instead of only *.ext files. I think this is a serious
bug and should be remedied immediately.


The -r flag isn't necessary here, assuming all *.ext filenames refer to 
actual files, not directories.



Cheers,
Phil


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils