Mailinglist Archive: opensuse-edu (64 mails)
| < Previous | Next > |
Re: [suse-linux-uk-schools] RM woes...
- From: "Geoff Goode" <goodeg@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Jun 2004 07:48:31 +0000 (UTC)
- Message-id: <004701c44a08$9ebda900$0f00a8c0@Zappa>
----- Original Message -----
From: "Christopher Dawkins" <cchd@xxxxxxxxxxxxxxxxxxxx>
To: "SuSE Linux UK Schools" <suse-linux-uk-schools@xxxxxxxx>
Sent: Thursday, June 03, 2004 9:51 PM
Subject: Re: [suse-linux-uk-schools] RM woes...
> Logging on of XP is a problem because of the massive profiles it
downloads.
Exactly. This has been a known problem for at least the past four years,
so I don't know why it hasn't been fixed.
We've only faced it since a batch of XP machines was put in last
September. When people started complaining of long login times I hacked an
old directory-walking Perl script so that it attacks all ~/.profiles
directories at 1am each night and then at 6am sends me a list of the ten
largest .profiles directories with their sizes. I investigate the largest
ones and anything in them I delete and/or add to the wipe list. This
clears several hundred megabytes most nights. It's very inefficient (but
it covers 400 directories in two minutes). For your interest the guts of
it at present are:
================ guts of .profiles-clearing script ============
$fname="/.profiles";
$fname1="/.profiles/My Documents";
$startmenuprogs="/.profiles/Start Menu/Programs/";
$applicationdata="/.profiles/Application\ Data/";
$gimpdir="/.profiles/.gimp-1.2/";
#print"checking...";
foreach $i (0 .. $#users) #users contains a list of all directories in
this group
{
if (!-e $users[$i].$fname) {next;}
# {print "\n$i $users[$i]";}
# {print "$users[$i]/";}
# system("du -s \'".$users[$i].$fname."\'");
system("rm -rf ".$users[$i]."/.profiles"."/.jpi_cache/*");
system("rm -rf ".$users[$i]."/.profiles/Desktop/cache/*");
system("rm -rf ".$users[$i]."/.profiles/Desktop/Demo*");
system("rm -rf ".$users[$i]."/.profiles/Desktop/New*");
system("rm -rf \'".$users[$i]."/.profiles/Start
Menu/Programs/Soldat\'");
#system("rm -rf \'".$users[$i].$startmenuprogs."Soldat\'");
system("rm -rf \'".$users[$i].$applicationdata."InstallShield\'");
system("rm -rf \'".$users[$i].$applicationdata."InstallShield
Installation Information\'");
system("rm -rf \'".$users[$i].$gimpdir."gimpswap.\*\'");
# big problem: the gimpswap wildcard does not work inside the '
system("rm -rf \'".$users[$i].$gimpdir."tmp\'");
system("rm -rf \'".$users[$i].$fname1."\'");
# {print "$users[$i]\n";}
if (-d $users[$i]."/.profiles/Desktop/cstrike") { system("rm -rf
".$users[$i]."/.profiles/Desktop/\*");}
system("find ".$users[$i]."/.profiles -name *.msi -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.eml -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.mov -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.nws -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.zip -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.tmp -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.wmz -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name *.asd -print0 | xargs -0
rm");
system("find ".$users[$i]."/.profiles -name setup.exe -print0 | xargs
-0 rm");
system("find ".$users[$i]."/.profiles -name SETUPNT.EXE -print0 | xargs
-0 rm");
system("find ".$users[$i]."/.profiles -name SetupDl.exe -print0 |
xargs -0 rm");
========== end of guts of .profiles-clearing script =========
You will notice that most of the solutions are violent (e.g. all "My
Documents" within .profiles are wiped, if any "cstrike" exists then the
whole "Desktop" is cleared), but Donald Rumsfeld would approve.
--
Christopher Dawkins, Felsted School, Dunmow, Essex CM6 3JG
01371-822698, mobile 07816 821659 cchd@xxxxxxxxxxxxxxxxxxxx
Like NT4 XP saves locally the profiles for all those that logged onto a
particular machine. It is possible, via a registry entry, to tell it not to
save any, or only to save a certain number and delete the oldest. I haven't
got the entry to hand, but I will look it up in due course. Also if you get
a corrupt local stored network profile you can delete the whole profile in
XP and it will be re-created the next time a user log into the network from
that machine.
Hey I thought that this was a Linux list! :-)
Is there anyone from a school in Cheshire on this list? That's besides me
of course.
**********************************************************************
Note : This E-Mail is sent in confidence for the addressee only.
Unauthorised recipients must preserve this confidentiality and
should please advise the sender immediately by telephone and
then delete the message without copying or storing it or disclosing
its contents to any other person.
We have taken all reasonable precautions to ensure that no viruses
are transmitted to any third party.
Any liability (in negligence or otherwise) arising from any party
acting, or refraining from acting on any information contained
in this e mail is hereby excluded.
Should you communicate with anyone at this address by e-mail,
you consent to us monitoring and reading any such correspondence.
Printing this email? Please think environmentally and only print when essential!
**********************************************************************
| < Previous | Next > |