Re: How do I recursively copy a file into many subdirectories?

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

 



On Fri, 2006-04-07 at 19:54 +0100, Paul Howarth wrote:
> On Fri, 2006-04-07 at 13:40 -0500, Gilbert Sebenste wrote:
> > Hello all,
> > 
> > I am trying to copy a file called ".something" from a
> > /dir1/dir2 directory into /dir1/dir2/dir3/dir4/dir5/dir6/dir7...etc.
> > That is, each sub-directory must have a copy of this file. I have tried:
> > 
> > cp -r .something /dir1/*
> > 
> > But that didn't do it. Thoughts?

and the world of *nix when there are many ways to do things....

for i in `ls /dir*`
do
cp .something $i/
done


AM


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux