From owner-freebsd-questions Thu Sep 21 21:51:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from srcso.globis.ru (globis.ru [212.248.80.7]) by hub.freebsd.org (Postfix) with ESMTP id BED2437B423 for ; Thu, 21 Sep 2000 21:51:36 -0700 (PDT) Received: from raduga.dyndns.org (raduga.sochi.net [212.248.82.76]) by srcso.globis.ru (8.9.3/8.9.3) with ESMTP id JAA18798 for ; Fri, 22 Sep 2000 09:10:21 +0400 (MSD) (envelope-from igor@raduga.dyndns.org) Received: (from igor@localhost) by raduga.dyndns.org (8.10.0/8.10.0) id e8M4pUY01225 for freebsd-questions@FreeBSD.ORG; Fri, 22 Sep 2000 08:51:30 +0400 Date: Fri, 22 Sep 2000 08:51:30 +0400 From: Igor Roboul To: FreeBSD-Questions Subject: Re: RECOVERY Message-ID: <20000922085130.H1004@linux.rainbow> Reply-To: igorr@crosswinds.net Mail-Followup-To: FreeBSD-Questions References: <20000921183848.G12637@siafu.iconnect.co.ke> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from keith@mail.telestream.com on Thu, Sep 21, 2000 at 08:46:36AM -0700 X-Operating-System: Linux linux.rainbow 2.2.14-plus-SMP X-Best-Window-Manager: Window Maker (www.windowmaker.org) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Sep 21, 2000 at 08:46:36AM -0700, keith@mail.telestream.com wrote: > Something like this would work. > > #!/bin/sh > LS="/home" #or what ever the path is. > > for name in $LS > do > chown -R $name.$name /home/$name > done Or in csh: #!/bin/csh -f cd /home foreach i ( * ) test -d $i if( $? == 0 ) then # We dont wish change owner of quota.user or other files? chown -R $i.$i $i endif end -- Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", Sochi, Russia http://www.brainbench.com/transcript.jsp?pid=304744 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message