On Tue, Jun 11, 2002 at 09:57:37PM +1000, Jeff Waugh ([EMAIL PROTECTED]) wrote:
> <quote who="Simon Bryan">
> 
> > I have all my users home directories under /home/popusers/
> > it turns out I may need to add a directory and set permissions on it in each
> > users directory (there are over 900 of them).
> > Is there a simple way to do this? Say the directory needs to be called
> > 'attach' in an existing 'dot' directory.
> 
> cd /home
> for i in *; do
>     mkdir -p $i/dot/attach;
>     chmod -R 0755 $i/dot/attach;

funny that most people dont know 'that' switch of mkdir ;-))

     mkdir -m 0700 -p $i/dot/attach;

>     chown -R $i:$i $i/dot/attach;
> done



jhs


-- 
Why are a wise man and a wise guy opposites?

             __, Jobst Schmalenbach, [EMAIL PROTECTED], Technical Director
   _ _.--'-n_/   Barrett Consulting Group P/L & The Meditation Room P/L      
 -(_)------(_)=  +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to