VectorLinux
November 21, 2014, 09:36:33 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: what's the deal with the tmp folder?  (Read 771 times)
MarkGrieveson
Vectorian
****
Posts: 531


« on: March 20, 2012, 08:18:21 pm »

Hello.  I used to use Debian, and there the /tmp folder was actually temporary.  Generally on a new boot up it started off almost empty, meaning it would be cleared with each new use.  I notice in Vector there's a huge amount of stuff in the /tmp folder even when I've just booted into the system.  So, stuff from previous usage seems to be preserved there (IE, it doesn't seem to be temporary).  What is the deal with this?
Logged

I am using VL7.0 standard with XFCE
bigpaws
Vectorian
****
Posts: 1857


« Reply #1 on: March 21, 2012, 04:59:42 am »

/tmp is used for more than temporary files. It is also used
for file locking and other purposes. Also slackbuilds uses
/tmp to store any programs you may have built.

This is within the File System Hierarchy standard.

Bigpaws
Logged
danthemannewtolinux
Vectorite
***
Posts: 107



« Reply #2 on: March 21, 2012, 10:47:51 am »

so, is there a way to set it to empty on boot?
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4029



« Reply #3 on: March 21, 2012, 05:40:41 pm »

You can add the line "rm -rf /tmp/*" to /etc/rc.d/rc.local. Just make sure you get the syntax right! Wink
Logged
pierce.jason
Packager
Vectorite
****
Posts: 250



« Reply #4 on: March 21, 2012, 06:21:26 pm »

You can also set it to use a ramfs, if you have enough ram. This can speed up certain operations quite a bit. Many distros automatically clear out /tmp
Logged

pierce.jason
Email: $(echo -e "moc\x2eliamg\x40nosaj.ecreip" | rev)
nightflier
Administrator
Vectorian
*****
Posts: 4029



« Reply #5 on: March 22, 2012, 04:37:35 am »

I've do use tmpfs for /tmp dir. It works great, but if you go that route, look out for some "gotchas". Some programs need a large amount of working space. In my case, I had to configure K3B to use a different location, because DVD images exceed my RAM capacity.
Logged
danthemannewtolinux
Vectorite
***
Posts: 107



« Reply #6 on: March 22, 2012, 07:05:58 am »

thanks guys, added the rm command to rc.local
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!