At 05:08 PM 9/23/2002 -0700, you wrote:
>   ls -R | grep ":$" | sed 's#:$##' | awk '{print "\""$0"\""}' | xargs 
> chmod g+s

Could I use something like this to set the proper ownership of a directory as
well?

I have copied all the user accounts from the BSDI machine to the Mandrake
box, then I used a shell script to set the proper ownership of the directories,
but I need to go in and set the sub directories.  Here is the base script I am
working off of, but I don't think it likes the -R option.

grep /home/ /home/scott/homedirpass | awk -F: '{ print $1 " " $4 " " $6
; }' \
   | while read pwuser pwgid pwhome ; do
     [ -d $pwhome ] || ( chown $pwuser:$pwgid $pwhome )
done

homedirpass is a copy of the Linux passwd file after I ran the script to
convert the accounts to the new machine.

Thanks,

-Scott

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to