LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 03-29-2010, 08:56 AM   #1
Mr.Gosh
Member
 
Registered: Sep 2004
Location: Germany
Distribution: openSuSE 11.2 64 bit
Posts: 48

Rep: Reputation: 15
Question Delete Temp Folder on Shutdown?


Hey Guys,

I found this Example how to delete Temp files on shutdown automagically.

How can I achive this in opensuse 11.2?

Any Ideas?

Thx
 
Old 03-29-2010, 08:59 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Why not use:
Code:
/etc/init.d/halt.local
Just add:
Code:
rm -rf /tmp/*

Last edited by rizhun; 03-29-2010 at 09:01 AM.
 
1 members found this post helpful.
Old 03-29-2010, 09:06 AM   #3
Mr.Gosh
Member
 
Registered: Sep 2004
Location: Germany
Distribution: openSuSE 11.2 64 bit
Posts: 48

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally Posted by rizhun View Post
Why not use:
Code:
/etc/init.d/halt.local
Just add:
Code:
rm -rf /tmp/*
That was fast, just a secon ago I found that file and wanted to ask if its the right place to be?
Why has the ubuntu guy posted this Version of the delete Command?
Code:
rm -fr /tmp/* /tmp/.??*
are the dot Files not deleted in the other case?

Would anything speech against this script or shouldn`t that lead to problems?

Thanks again!
 
Old 03-29-2010, 09:18 AM   #4
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Yes, you'll need to use '/tmp/.??*' if you want to delete hidden files.

So you would put the following in /etc/init.d/halt.local:
Code:
rm -fr /tmp/* /tmp/.??*
Sorry, I don't understand this sentence, what do you mean by 'speech'?:
Quote:
Would anything speech against this script or shouldn`t that lead to problems?

Last edited by rizhun; 03-29-2010 at 09:20 AM.
 
Old 03-29-2010, 09:24 AM   #5
Mr.Gosh
Member
 
Registered: Sep 2004
Location: Germany
Distribution: openSuSE 11.2 64 bit
Posts: 48

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rizhun View Post
Sorry, I don't understand this sentence, what do you mean by 'speech'?:
OK that is funny - I translated a german idiom into english without thinking about it...

I meant something like this:
"There is nothing to be said against it. Right?"

I wanted to know if it could be a problem to do that on shutdown?
 
Old 03-29-2010, 09:46 AM   #6
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
I think it should be OK.

Nothing should be using /tmp that needs to be stored for an extended period of time.

You will lose your history files though, so you won't be able to look back at commands you've run in previous sessions. Although, this can be resolved by changing your $HISTFILE environment variable.
 
Old 03-29-2010, 09:33 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Look in Yast2`s sysconfig editor. Clearing /tmp on power down or for older files can be configured their.
 
  


Reply

Tags
temperature


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Delete temp files. caa1980 Ubuntu 6 03-29-2010 08:47 AM
delete temp file in linux Arjun123 Linux - Newbie 2 06-24-2009 01:18 AM
delete yesterday's temp files Flugelhornchris Programming 8 02-04-2008 01:52 PM
How To Delete temp Internet Files? agee220 Linux - Newbie 3 08-25-2004 03:36 PM
Temp Folder tfrye Linux - General 3 04-18-2001 09:33 AM


All times are GMT -5. The time now is 09:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration