Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

easy-directories



>>>>> "K" == K C <null@example.com> writes:

    K> /home/user1/test
    K> /home/user2/test
    K> etc..etc..

su
for dir in /home/*; do
 if [ -d $dir ]; then
  mkdir $dir/test
  chown ${dir#/home} $dir/test      # maybe you should set group, too
  # chmod 0750 $dir/test            # maybe you need this
 fi
done

Alternatively you could use something more complicated to parse
/etc/passwd.


-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links