[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] cp recursive command ?
- Subject: RE: [cobalt-users] cp recursive command ?
- From: "Andy Brown" <andy.brown@xxxxxxxxxxxxx>
- Date: Fri Sep 6 08:15:01 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
<snip>
> Now my question : How can i make to copy my modified
> /etc/skel/.ftphelp file
> on EVERY users's .ftphelp file ???
> I have a server with over 300 users, and really don't want to
> edit every
> user with pico ;)
> Thanks to show us also the command to preserve the owner and the
> permissions.
</snip>
What about a bit of /bin/bash'ery ;)
#!/bin/sh
FILESTOFIX=`cd /home/sites;find |grep .ftphelp`
for i in $FILESTOFIX; do
echo "Line1" > $i
echo "Line2" >> $i
done
echo "All done!"
Hope that helps, i did a quick test here and worked fine, but TEST IT FIRST!!!!
Have a good weekend all!
Regards,
Andy
andy@xxxxxxxxxx
http://www.raqpak.com/ <-- Raq/Qube unofficial PKGs and support advice