[K12OSN] Help with script

Klaus Ade Johnstad klaus at skolelinux.no
Wed Apr 29 15:30:27 UTC 2009


Onsdag 29. april 2009 16:32, skrev Brian Chivers:
> I'm trying to use the script on the k12ltsp wiki(1) to remove firefox
> cache but the problem is that our students directories are in sub
> directories under /home_student e.g
>
> /home_student
> 	tutorgroup
> 		2S-EG
> 		   k123456
>
> How can I alter the script to descend into each if the sub
> directories and wipe as it goes ??
>
> Thanks
> Brian Chivers
> Portsmouth College
>
> (1)http://k12ltsp.org/mediawiki/index.php/Cache_Removal
>

I'd use something like this,

for x in `getent passwd|grep home_student|cut -d":" -f6`;
do echo rm $x/.mozilla/firefox/*.default/Cache/*;done

Remove the echo once you are sure that the rm command only will remove 
what you intend.

Oh, and there is a millions ways to do this, wait for a few more 
answers, and choose the one you are most comfortable with.

-- 
Klaus Ade
67E61D18B2C44F8A3DA35C6D849F9F5F 26FA477D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/k12osn/attachments/20090429/f0ed02e8/attachment.sig>


More information about the K12OSN mailing list