Bill Jonas on Fri, 1 Nov 2002 15:20:04 -0500


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

Re: [PLUG] Routine maintenance


On Fri, Nov 01, 2002 at 02:38:17PM -0500, Arthur S. Alexion wrote:
> I used to do a number of things routinely on my windows computer:
> 
> 1. scandisk/chkdsk
> 2. defrag
> 3. delete errant tmp files
> 
> I believe that number 1. is run at bootup as I am using ext3 file 
> system.

Well, fsck replaces scandisk and chkdsk.  It's generally not necessary
if you shut down cleanly.  With ext3, you shouldn't need to run it at
all (in theory), unless perhaps you're a kernel developer working on the
filesystem code. ;-)

> I don't know whether 2. is possible or necessary

It is possible, but not very necessary.  More specifically, there exist
utilities to do defragmentation (at least on ext2), but from what I've
heard, they tend to be quite experimental.  I'm not aware of any yet for
ext3, but that doesn't mean they don't exist.

In any case, the stock answer is, "You don't need to defrag your
partitions because Linux does a much better job of not allowing
fragmentation to occur in the first place."

> I am not sure the best way to find the deletable files in Linux.

You might run a daily cron job consisting of something like the
following:

  find /tmp /var/tmp -atime 7 -type f -print0 |xargs -0 rm

This will delete all files in /tmp and /var/tmp which haven't been
opened in the last 7 days and delete them.  (See also find(1),
xargs(1).)  If you'd like, you could also include /home/*/tmp in the
above line, but I'm not sure that I'd recommend that.

(If you do this, *don't* mount any filesystems on /tmp!  It never
occurred to me that someone might do this, but I was reading
http://www2.hunter.com/~skh/humor/admin-horror.html the other day...)

> Can someone please confirm or correct me on 1. & 2.?  And could someone 
> direct me to something I can read about a routine file deletion 
> regimen?  

Sorry, no links offhand.

> Last, is there something unique to Linux that I should also be doing 
> that never have done with windows?

Well, there are things such as log rotation and the like, but your
distribution should have already taken care of that for you by setting
up the proper cron jobs.  I can't think of anything else off the top of
my head...

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Attachment: pgpkPE6T4N7aN.pgp
Description: PGP signature