# I have two /tmp



## mfaridi (Dec 11, 2008)

I install FreeBSD 7 with default partitioning and installer make my hard automatic partition . when I browse my HDD , I see I have two 

```
/tmp
```

one of them is in here


```
/var/tmp
```

and other is here


```
/tmp
```

many program use 
	
	



```
/tmp
```
 and this partition is not big so sometimes this 
	
	



```
/tmp
```
 fulled and my system sometimes hang and sometime Gnome can not start , and I have to clear and delete all thing in 
	
	



```
/tmp
```
 and 
	
	



```
/var/tmp
```
 and after that my system work good

how I can set all packages use 
	
	



```
/var/tmp
```
 and do not use 
	
	



```
/tmp
```
 ???


this is my
	
	



```
df -h
```


```
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s1a    496M    245M    211M    54%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/ad10s1e    496M    578K    456M     0%    /tmp
/dev/ad10s1f    140G     90G     38G    70%    /usr
/dev/ad10s1d    1.9G    438M    1.3G    24%    /var
```


----------



## Maledictus (Dec 11, 2008)

You only have one /tmp, it's /tmp, /var/tmp ist something different. Afaik the usual distinction is that the contents of /var/tmp survives a reboot, while /tmp does not. I have

```
clear_tmp_enable="YES"
```
in my /etc/rc.conf. That helps


----------



## Ole (Dec 11, 2008)

in some case you may define $TMPPATH environment for /var/tmp, but will be better if you make symlinks.
But usually both tmp location usage for difference task and such action not needed. May by if you set in /etc/rc.conf


> clear_tmp_enable="YES"  # Clear /tmp at startup.
> clear_tmp_X="YES"       # Clear and recreate X11-related directories in


all your problem with gnome away?


----------



## mfaridi (Dec 11, 2008)

Thanks Guys , but I put all of them before and they work , but I want only application use one /tmp , not two /tmp


----------



## graudeejs (Dec 11, 2008)

have you ever hear of symbolic links?
try it... (link one to another)


----------



## mfaridi (Dec 11, 2008)

killasmurf86 said:
			
		

> have you ever hear of symbolic links?
> try it... (link one to another)


where I make this link ??


----------



## richardpl (Dec 11, 2008)

Click on right mouse button, and than popup will appear asking you to create new shortcut, be sure you click on desktop and not on any window.


----------



## harisman (Dec 11, 2008)

First decide what "tmp" dir you want to use, depending on your partition scheme and the available size.

This is one example, if you have adequate disk space on the /var partition and want to use the /var/tmp , move the /tmp/* files to /var/tmp/ , erase the /tmp dir and then create the symbolic link as killasmurf86 mentioned:

mv /tmp/* /var/tmp && rmdir /tmp && ln -s /var/tmp /tmp

.. and vice versa, if you want to use the /tmp.


----------



## SirDice (Dec 11, 2008)

The difference is historical. On Solaris /tmp is actually the same partition as the swap. So by using /tmp you're eating away virtual memory. Something to remember if you're on one.

On my fbsd system I have an 8GB /tmp as I regularly open big archives in gnome's File Roler. Left /var/tmp for what it is.


----------



## graudeejs (Dec 11, 2008)

mfaridi said:
			
		

> where I make this link ??




```
$ [url=http://www.freebsd.org/cgi/man.cgi?query=ln&apropos=0&sektion=0&manpath=FreeBSD+7.0-RELEASE&format=html]man ln[/url]
```


----------



## ale (Dec 11, 2008)

```
man hier
```


----------



## hydra (Dec 20, 2008)

ln -s /var/tmp /tmp


----------

