[K12OSN] Help with a script
Tim Born
k12osn at deltacfax.com
Tue Sep 30 15:01:48 UTC 2008
Good use of find.
> find /home_student/tutorgroup/${w$}/{x}/.mozilla/ -exec rm -Rf {} \;
Can we simplify this to a one-liner? I believe you said you wanted the
.mozilla directory and all contents deleted?
The above will leave the .mozilla directory in place.
find /home_student -name .mozilla -exec rm -Rf {} \;
> I'd like the script to remove the .mozilla directory completely
Brian Chivers wrote:
> I've got a issue where I've had to tweak the setting for firefox but
> of cause some users have been using it and they're not working as they
> have settings in ~/.mozilla.
>
> I've looked at the script on this page
> http://k12ltsp.org/mediawiki/index.php/Cache_Removal and tweaked it
> slightly.
>
> Our users homes all live in a structure like this
>
> /home_student/tutorgroup/xx-xx/username
>
> where xx-xx is a tutorgroup such as 3P-SC
>
> so you have
>
> /home_student/tutorgroup/3P-SC/k999999
>
> I'd like the script to remove the .mozilla directory completely so
> next time they start up it'll copy it over again for them hopefully
> fixing the problems.
>
> Can anyone see any problems (I'll be amazed if there arent' any *grin*)
>
> Thanks
> Brian
>
> #!/bin/bash
> for w in `ls /home_student/tutorgroup`; do
> echo "doing $w ....."
> for x in `ls /home_student/tutorgroup/${w}`; do
> echo "Doing $x ..."
> find /home_student/tutorgroup/${w$}/{x}/.mozilla/ -exec
> rm -Rf {} \;
> done
> done
>
> ------------------------------------------------------------------------------------------------
>
> The views expressed here are my own and not necessarily
>
> the views of Portsmouth College
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/k12osn/attachments/20080930/21f46b73/attachment.htm>
More information about the K12OSN
mailing list