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

Re: [K12OSN] Help with script



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

Attachment: signature.asc
Description: This is a digitally signed message part.


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