LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-30-2005, 07:30 PM   #1
Add1Sun
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu hoary
Posts: 19

Rep: Reputation: 0
temp file/cookie cleaner program


Hi all, I use a program called CCleaner on my win machine that removes all cookies, temp files, etc in one go which is very nice. Is there anything equivalent for linux? Even if its just a script to run with cron. I looked on Google but I must not be using the right search terms as I'm coming up blank.

Thanks
Addi
 
Old 08-30-2005, 07:45 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I searched for quite a while until I found the config setting to clear /tmp. But, it clears on boot, not on shutdown. At least it clears.

As far as browser caches and /var/log files are concerned, I had to write a simple bash script to do the job of clearing caches, message files, etc.

It basically consists of:

cd <some path to subdirectory>
rm * (remove all files)

cd <some other directory)
rm *

cd <somewhere else)
/dev/null > <filename> (where /dev/null overwrites the file, usually some log file, and leaves an empty file, without deleting the file name, which might break the system if the file no longer exists).

Since some of the files require root permission to clear their contents via /dev/null, or delete some files, so I placed the script in /root, and su to root to run the script.

It's possible to call the script during boot and clear those files, but that will make the boot process take a while longer.

This is a good time to try your hand at writing a bash script to do housekeeping chores.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C Program Problem (temp conversion) username17 Programming 11 05-16-2005 01:57 PM
Temp root privilege in program? ZX_SA Programming 1 07-22-2004 08:14 AM
cpu temp program ??(suse 9.1) starking Linux - Software 2 07-11-2004 11:42 AM
CPU temp program.. InDIo Linux - Software 9 08-09-2003 04:51 PM
temp file, somewhere? florestan Linux - Software 9 04-14-2003 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration