|
From: | Philip Rowlands |
Subject: | Re: bug in cp -r command |
Date: | Mon, 13 Jul 2009 13:39:37 +0100 (BST) |
User-agent: | Alpine 1.10 (DEB 962 2008-03-14) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |