I have two /tmp

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

one of them is in here

Code:
/var/tmp

and other is here

Code:
/tmp

many program use
Code:
/tmp
and this partition is not big so sometimes this
Code:
/tmp
fulled and my system sometimes hang and sometime Gnome can not start , and I have to clear and delete all thing in
Code:
/tmp
and
Code:
/var/tmp
and after that my system work good

how I can set all packages use
Code:
/var/tmp
and do not use
Code:
/tmp
???


this is my
Code:
df -h

Code:
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
 
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
Code:
clear_tmp_enable="YES"
in my /etc/rc.conf. That helps :)
 
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?
 
Thanks Guys , but I put all of them before and they work , but I want only application use one /tmp , not two /tmp
 
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.
 
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.
 
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.
 
Back
Top