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

Re: copy many files filtering extensions



On Mon, 13 Jan 2003 17:25:42 +1100
Rob Weir <rweir@softhome.net> wrote:

> On Wed, Jan 08, 2003 at 04:10:10PM +0100, Mat wrote:
> > I have to periodically copy a lot of files filtering them by their
> > extensions (something like cp * but *.bak). How can I do that (as
> > I can read from cp' man or info page this is not possible)?

I don't understand do you need to copy all .bak files ?? 

then it's easy just do
$ cp *.bak foo/

or do you need to make copies of some files adding .bak to their
filenames then you'll have ot use a for statement

$ fo i in *; do cp $i $i.bak; done

cheers,
Alaa
-- 
get my PGP/GPG signature at
http://www.geocities.com/alaaov/pub_key.txt

Perilous to all of us are the devices of an art deeper than we 
ourselves possess.
        -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]
		

Attachment: pgp3bcQmv7Xgn.pgp
Description: PGP signature


Reply to: