On Wednesday, March 21, 2001 12:21 PM, Tony Green
[SMTP:[EMAIL PROTECTED]] wrote:
> * This one time, at band camp, Bernhard L?der said:
> > Hi,
> >
> > I am just after a hint.
> >
> > I have to copy a file to all user directories.
> >
> > cp file.file /home/*
> >
> > will only copy file.file to the first user not all users. How would I do
> > this without listing the individual directories
> >
> try this (should work in bash - you didn't state which shell you were
> using)
>
> for I in /home/*
> do
> cp file.file $I
> done
>
>
> Indentation is optional - just helps readability
>
> HTH
Won't this clobber any files which might be living in /home? Might want to
check first that none are there...
Cheers,
Marty
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug