LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Maintenance realted Questions (optimizing your Linux Load) (https://www.linuxquestions.org/questions/linux-newbie-8/maintenance-realted-questions-optimizing-your-linux-load-553473/)

NuxIT 05-12-2007 10:02 PM

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
###########
reiserfsck --check started at Sat May 12 20:58:04 2007
###########
Partition /dev/hda6 is mounted with write permissions, cannot check it

Does this mean I have to run this command in a non-GUI environment from the shell? This is on my Knoppix HDD load and I really like this load I just want to keep it running efficiently.

Thanks for any/all tips on keeping a smooth running linux load

JimBass 05-12-2007 10:18 PM

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

NuxIT 05-12-2007 10:31 PM

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.

JimBass 05-12-2007 11:10 PM

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

Sonneteer 05-13-2007 05:21 PM

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.

NuxIT 05-25-2007 09:21 PM

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.