<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Good use of find. <br>
<blockquote type="cite">find <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home_student/tutorgroup<span
 class="moz-txt-tag">/</span></i>${w$}/{x}/.mozilla/ -exec rm -Rf {} \;</blockquote>
Can we simplify this to a one-liner?  I believe you said you wanted the
.mozilla directory and all contents deleted?<br>
The above will leave the .mozilla directory in place.<br>
<br>
<span class="moz-txt-slash">find <span class="moz-txt-tag">/</span>home_student</span>
-name .mozilla -exec rm -Rf {} \;
<blockquote type="cite">I'd like the script to remove the .mozilla
directory completely</blockquote>
<br>
<br>
Brian Chivers wrote:
<blockquote cite="mid48E23408.1060508@portsmouth-college.ac.uk"
 type="cite">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.
  <br>
  <br>
I've looked at the script on this page
<a class="moz-txt-link-freetext" href="http://k12ltsp.org/mediawiki/index.php/Cache_Removal">http://k12ltsp.org/mediawiki/index.php/Cache_Removal</a> and tweaked it
slightly.
  <br>
  <br>
Our users homes all live in a structure like this
  <br>
  <br>
/home_student/tutorgroup/xx-xx/username
  <br>
  <br>
where xx-xx is a tutorgroup such as 3P-SC
  <br>
  <br>
so you have
  <br>
  <br>
/home_student/tutorgroup/3P-SC/k999999
  <br>
  <br>
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.
  <br>
  <br>
Can anyone see any problems (I'll be amazed if there arent' any *grin*)
  <br>
  <br>
Thanks
  <br>
Brian
  <br>
  <br>
#!/bin/bash
  <br>
for w in `ls /home_student/tutorgroup`; do
  <br>
echo "doing $w ....."
  <br>
         for x in `ls /home_student/tutorgroup/${w}`; do
  <br>
             echo "Doing $x ..."
  <br>
             find /home_student/tutorgroup/${w$}/{x}/.mozilla/ -exec rm
-Rf {} \;
  <br>
         done
  <br>
done
  <br>
  <br>
------------------------------------------------------------------------------------------------
  <br>
   The views expressed here are my own and not necessarily
  <br>
  <br>
               the views of Portsmouth College    <br>
_______________________________________________
  <br>
K12OSN mailing list
  <br>
<a class="moz-txt-link-abbreviated" href="mailto:K12OSN@redhat.com">K12OSN@redhat.com</a>
  <br>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/k12osn">https://www.redhat.com/mailman/listinfo/k12osn</a>
  <br>
For more info see <a class="moz-txt-link-rfc2396E" href="http://www.k12os.org"><http://www.k12os.org></a>
  <br>
</blockquote>
<br>
</body>
</html>