On Wed, 21 Mar 2001, Rick Welykochy wrote:
> On Wed, 21 Mar 2001, [iso-8859-1] Bernhard L�der wrote:
>
> > I am just after a hint.
> >
> > I have to copy a file to all user directories.
> >
> > cp file.file /home/*
>
> We've needed a script-pissing contest ...
>
> for f in /home/*; do cp file.file $f; done
Well I was going with
find . -maxdepth 1 -exec cp file.file {} \;
but its a little longer than yours Rick.
Now I see why people use one character switches on commands, it helps you
win script-pissing contests. Facing using -maxdepth when -j would suffice!
I probably also need a -type d in their as well, just incase someone puts
files into /home. I don't think the scripts so far have taken this into
account.
Rodos
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug