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

Re: [K12OSN] Script to flush down the drain files from every user home...



On Thu, 2008-06-19 at 20:48 -0700, Jim Christiansen wrote:
> Hi guys,  Thanks the thoughts.  On the upgrade/wipe-install question.
> Today I backed up the group, shadow, password bla bla bla bla bla
> files, unplugged the back-up rsync drive and did a full wipe then new
> k12el5 install.  Put back the vital parts of the necessary conf files,
> altered the network settings in the template ltsp dir for my different
> network subnet, did the k12 initialize, plugged in the second drive,
> mounted it then rsynced back to the users homes and perms of the
> users...
> 
> Everything is good to go for the fall start of school!  Now for the
> other two boxes!
> 
> OK so. what I need to do is to drop into EVERY users' home and remove
> a set of files...
> 
> I've search high and low, through the lists going back 3 years or so
> and can't find reference to any script that did this.  I think there
> was one that several contributed to that we used to trash the dot
> mozilla, .g* files, and I used it also for getting rid of the dot
> cxoffice folders.  I'm not great at shell scripts.
> 
> Anyone have one?  Thanks,   Jim  :-)

for users in `ls -1 /home`
do
cd /home/$user
rm -rf .mozilla .g* .cxoffice*
done

Just add more dotfiles to the list. This is a very aggressive script and
it will not spare any users. Make sure you have a backup of /home first.
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean. 
> _______________________________________________
> K12OSN mailing list
> K12OSN redhat com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC                           
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney localnetsolutions com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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