document updated 18 years ago, on Sep 30, 2007
Periodic maintenance I should do on 68k.org (a linux box):
- Check if Mutt is taking up too much memory, and if so, reduce the mailbox size.
- quick less-accurate check of whether I have too many emails in my mailbox:
run "ls -rShl /var/mail/"; if my name is very near the bottom, then it's too big
- check whether mutt is taking up too much memory
run "top"; press "F", "n", "enter"; press "x" until the sort column is hilighted; compare the "Virt" size of my process to others... if it's very near the top, then I'll need to reduce my mailbox size
(do I need to restart Mutt after cleaning out email, for the change in RAM to be reflected in top?
- remove the "cron" spam I tend to just ignore
in Mutt, press "l", "~f cron", enter; press "T", enter; press ";", "d" (if you have a lot of emails marked, mutt may take a few seconds to respond); press "$" and wait for the mailbox to be fully written out
- delete the REALLY SUPER OBVIOUS spam
in Mutt, press "l", "~h 'X-Spam-Status:.*score=[2-9][0-9]'", enter; press "T", enter; press ";", "d"; press "$" and wait for the mailbox to be fully written out
- delete the still really rather obvious spam
same as above, but use "~h 'X-Spam-Status:.*score=[1-9][0-9]' ~n-5", enter; press "T", enter; press ";", "d"; press "$" and wait for the mailbox to be fully written out
- delete stuff that's very probably spam, barring anything that's been whitelisted
same as above, but use "~h 'X-Spam-Status:.*score=([1-9][0-9]|[7-9]\.)' ~n-5"
- delete stuff that's most likely spam, barring anything that's been whitelisted, but, you know, I really need to cut down on my disk space, and really would prefer to not to actually archive spam
same as above, but use "~h 'X-Spam-Status:.*score=([1-9][0-9]|[5-9]\.)' ~n-5"
- no really, cut out the spam
same as above, but use "~h 'X-Spam-Status:.*score=([1-9][0-9]|[3-9]\.)' ~n-5"
- delete non-spam that I don't really need anymore. Filters include:
- ~f slashdot.org ~s "comment moderation|reply to"
- ~f monster.com ~s "Monster Agent Results"
- Check if my home directory is taking up too much space, and if so, clean some stuff out
- determine what percentage of the /home/ space is being used by me (since many files/dirs are unreadable, I can't accurately figure out how much each person is using, but I can accurately determine global statistics). If it's, say, >5-10%, I should clean stuff up.
perl -le 'my($used)=split" ", qx[du -sk ~]; my$total=(split" ",qx[df -k ~ | tail -1])[2]; printf "%5.2f%% of /home/ used by me.\n%5.2fGB total used by everyone\t\t%5.2fGB total used by me\n", 100*$used/$total, $total/1048576, $used/1048576'
- determine how much space /home/ has free... if it's, say, <1GB, then clean some stuff up
perl -le 'my($free)=(split" ",qx[df -k ~ | tail -1])[3]; printf "%5.2f GB free on /home/\n", $free/(1024*1024)'
- locate the very largest individual files, remove any unnecessary ones