nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

/tmp clean directory automatically using tmpwatch

This is a discussion on /tmp clean directory automatically using tmpwatch within the Getting started tutorials forums, part of the Linux Getting Started category; is it ok to clean up all directory n files on /tmp? from someone who need a little space cheers, ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-25-2007, 04:25 AM
Junior Member
 
Join Date: Mar 2007
Posts: 2
Rep Power: 0
tanachi
Default /tmp clean directory automatically using tmpwatch

is it ok to clean up all directory n files on /tmp?

from someone who need a little space

cheers,

chikatambun
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-25-2007, 02:38 PM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

clean all I think no, becoz some are used by the system and your user.
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
  #3 (permalink)  
Old 03-27-2007, 09:17 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 967
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You may need to use a command called tmpwatch which removes files which haven’t been accessed for a period of time. Normally, it’s used to clean up directories which are used for temporary holding space such as /tmp.

Following code will remove all files/dirs from /tmp if they are not accessed in last 2 weeks (24 * 14 days = 336)
Code:
tmpwatch --mtime --all 336 /tmp
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #4 (permalink)  
Old 05-24-2007, 03:15 AM
Member
User
 
Join Date: May 2007
Posts: 56
Rep Power: 2
lacloai is on a distinguished road
Default Hi

I run tmpwatch command at root, and it's saying "command not found". I am running SuSe10. So, is there a package that I need to install before I can use tmpwatch on SuSe? Please help. Thanks a lot.
Reply With Quote
  #5 (permalink)  
Old 05-24-2007, 10:58 AM
Member
User
 
Join Date: Jun 2005
Posts: 78
Rep Power: 0
jerry
Default

Quote:
Originally Posted by lacloai View Post
I run tmpwatch command at root, and it's saying "command not found". I am running SuSe10. So, is there a package that I need to install before I can use tmpwatch on SuSe? Please help. Thanks a lot.
Use yast/yast2 and install tmpwatch package / rpm
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to start Apache2 automatically at boot satimis Web servers 2 02-03-2008 06:03 PM
run a command automatically after every 10 mins vikas027 Shell scripting 1 11-01-2007 07:24 PM
Automatically restart unix daemon raj Linux software 2 12-16-2006 11:29 AM
Dynamic DNS , should get updates automatically from DHCP sonaikar Linux software 1 03-28-2005 12:14 PM
How to update DNS through DHCP automatically sonaikar Shell scripting 1 03-16-2005 06:42 PM


All times are GMT +5.5. The time now is 05:44 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36