[CLUE-Tech] The cp command

Kevin Cullis kevincu at orci.com
Sat Apr 14 21:32:43 MDT 2001


Brandon N wrote:
> 
> > > Hi,
> > >
> > > I'd like to copy a file into all recursive directories below the
> > current
> > > directory, I've tried using:
> > >
> > > cp -R filename
> > >
> > > but it didn't work.  Any suggestions?
> > >
> > > Kevin
> 
> what do you mean recursivly ie:
> 
> case 1
> /
> | dir1/
> | dir2/
> | dir3/
> 

This one!

> 
> either way, you're going to have to use a FOR loop to copy in to all
> three directories.
> 

I was thinking that was the way I'd have to go, but I'm not at that
point in scripting yet and wanted to see if there was another way.

The issue is  I have a JPEG which I wanted to cp into each directory
since all of them needed it. I could also pipe the same file into each
directory, right?

Kevin



More information about the clue-tech mailing list