Maintenance realted Questions (optimizing your Linux Load)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.