Maintenance realted Questions (optimizing your Linux Load)
Hi, I'm curious as to how you maintain a linux system. In windows I routinely clear out temp directories because I know where all these are located. I also run scan disk and defrags to keep the system optimal. So, I'm wondering where Linux keeps a lot of tmp/temp files so I can clean out extra files since I'm running with very limited HDD space.
Also, when I run what the linux equivalent to defrag (fsck) I get the following error. Code:
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes Thanks for any/all tips on keeping a smooth running linux load |
Linux stores temp files in the appropriately named /tmp directory.
You do not need to defrag linux disks like you do in windows. Windows splits files, and places them all over the hard drive. The linux filesystem is not so haphazard, and won't make a mess of your drives like that. You cannot run fsck on a mounted read/write drive, however you don't need to. If fsck needs to be run, it will be run during the boot process before the system fully starts. Peace, JimBass |
Hi Jim. Thanks for that info on fsck. Guess its nice to know linux maintains its file system quite well without much user intervention needed. Running a "locate tmp" shows quite a few directories so I suppose I could go digging around in those to delete stuff next time my HDD starts getting filled out.
|
You could, but you may cause yourself some problems that way. Most of temp is just garbage, but some of that garbage is garbage in use, the X window system that gives you a graphical environment places files in /tmp, and erasing them might cause problems.
With disks being so incredibly cheap at the moment, I find it hard to believe that you can't get at least a 40 Gb hard drive for like $20, and have all the space you need. You can try to clear /tmp, but a better system would be to create a partition for /tmp, and then when the partition is full, the system will replace unnedded files with new ones. Peace, JimBass |
For cleaning out temp files I use this script: http://linuxgazette.net/issue20/cleantmp2.0. It's ten years old, so there might be something better, but it's worked for me. By default it will remove everything from /tmp that hasn't been accessed for more than 3 days.
|
Thanks for the additional info on keeping the system clean. I'll look into that script file. I'm not putting any money into this laptop since it's falling apart but I still want it running. Regards, Chris
|
All times are GMT -5. The time now is 03:19 PM. |