> Daniel Woods wrote on Tue, Sep 24, 2002 at 10:46:22AM -0600 :
> >
> > > all the directories and set the sgid bit. But a oneline bash command
> > > will do it for you:
> > > ls -R | grep ":$" | sed 's#:$##' | awk '{print "\""$0"\""}' | xargs chmod g+s
> > > Work through the logic and it will start to make sense. The awk
> > > statement is included for the sole purpose of putting quotes around the
> > > name incase it contains spaces or funky characters.
> > Although I think this would be much cleaner to use...
> > find /var/www -type d -exec chmod g+s {} \;
>
> Does it work if the directory name or path contains spaces? I am unable
> to test at the moment (short on time).
Yes.
# mkdir '/tmp/test with spaces'
# find /tmp -type d -exec echo {} \;
.
./.font-unix
./BACKUP
./BACKUP/SQL
./kde-dwoods
./.ICE-unix
./test with spaces
# rm -rf '/tmp/test with spaces'
Thanks... Dan.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com