1833873 Members
1884 Online
110063 Solutions
New Discussion

Re: /var/tmp

 
SOLVED
Go to solution
Stuart Powell
Super Advisor

/var/tmp

What sort of files get put in this directory? I need to open up some file system space in /var, and I've found some old files. The owners are various, but I'm not sure what if anything is essential.
Any help would be appreciated.
Sometimes the best answer is another question
5 REPLIES 5
Kevin Wright
Honored Contributor
Solution

Re: /var/tmp

system files are put here, like when you use vi for example, it creates a tmp file in this dir. It is safe to delete files in here that have not been accessed for a few days or so, and you may wish to clean out /tmp and /var/tmp on reboots.
find /var/tmp -atime +7 |xargs rm
V. V. Ravi Kumar_1
Respected Contributor

Re: /var/tmp

James R. Ferguson
Acclaimed Contributor

Re: /var/tmp

Hi Stuart:

'/var/tmp' is used as temporary filesystem space by 'sort' and by the SD utilities ('swinstall', etc.) among others.

You can optionally cause this directory to be emptied during startup. See the 'clean_tmps' script in /sbin/rc2.d/ and the driving configuration file '/etc/rc.config.d/clean_tmps'.

Regards!

...JRF...
MANOJ SRIVASTAVA
Honored Contributor

Re: /var/tmp

Hi Stuart

Also the application and database use it as a scratch pad , so incase you want to empty it please be careful as it will bring down oracle if running , the best way is to cleant it during boot or cron it to do so when the apps and database are down.

Manoj Srivastava
PIYUSH D. PATEL
Honored Contributor

Re: /var/tmp

Hi,

Be careful while removing the files in it since the users which may have opened a file may have a tmp file associated in this dir and it may create problems for him. Best way is to remove when the users are not using the system and the databse is also down.

You can even put a script during the system startup to remove the /var/tmp files.

Piyush