VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: what's the deal with the tmp folder?  (Read 900 times)

MarkGrieveson

  • Vectorian
  • ****
  • Posts: 531
what's the deal with the tmp folder?
« on: March 20, 2012, 09: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: 1869
Re: what's the deal with the tmp folder?
« Reply #1 on: March 21, 2012, 05: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
Re: what's the deal with the tmp folder?
« Reply #2 on: March 21, 2012, 11:47:51 am »

so, is there a way to set it to empty on boot?
Logged

nightflier

  • Administrator
  • Vectorian
  • *****
  • Posts: 4085
Re: what's the deal with the tmp folder?
« Reply #3 on: March 21, 2012, 06: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! ;)
Logged

pierce.jason

  • Packager
  • Vectorite
  • ****
  • Posts: 250
Re: what's the deal with the tmp folder?
« Reply #4 on: March 21, 2012, 07: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: 4085
Re: what's the deal with the tmp folder?
« Reply #5 on: March 22, 2012, 05: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
Re: what's the deal with the tmp folder?
« Reply #6 on: March 22, 2012, 08:05:58 am »

thanks guys, added the rm command to rc.local
Logged