Operating System - HP-UX
1834015 Members
2328 Online
110063 Solutions
New Discussion

Re: 2 temp directories on hpux

 
SOLVED
Go to solution
Shivkumar
Super Advisor

2 temp directories on hpux

There exist 2 temp directory on hpux. On most of the other unix i guess there is only only /tmp directory.

What are the significance of 2 temp directories on hpux /var/tmp/ and /tmp ??

Thanks,
Shiv
9 REPLIES 9
Steven E. Protter
Exalted Contributor
Solution

Re: 2 temp directories on hpux

The two directories are for different things.

/tmp is required by a few applications like the oracle installer.

/var/tmp is usually but not always part of the /var filesystem where variable (hence the name) temporary output such as logs are kept.

They can to some degree depending on how you install your hp-ux system be used interchangeably.

Take a look at the contents on a system thats been running for a while.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cem Tugrul
Esteemed Contributor

Re: 2 temp directories on hpux

Shiv,

could you please do a man page ;
#man hier

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Muthukumar_5
Honored Contributor

Re: 2 temp directories on hpux

Difference between /tmp and /var/tmp is,

/tmp is used to generate application logs and will be disappeared on reboot

/var/tmp is also used to generate application logs and will not be disappeared on reboot

hth.
Easy to suggest when don't know about the problem!
Rainer von Bongartz
Honored Contributor

Re: 2 temp directories on hpux

well, /tmp is not automatically cleaned on reboot.

This task is performed by
/sbin/init.d/clean_tmps
and you have to enable it by setting
CLEAR_TMP=1
in
/etc/rc.config.d/clean_tmps

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Yogeeraj_1
Honored Contributor

Re: 2 temp directories on hpux

hi shiv,


/tmp is for System-generated temporary files
/var/tmp is for Application-generated temporary files

These directory generally are not generally cleared between system reboots, you will have to set the flags in /etc/rc.config.d/clean_tmps

LIST_TEMPS=1
CLEAR_TMP=1

hope this helps!

regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Rajesh SB
Esteemed Contributor

Re: 2 temp directories on hpux

Hi Shiv,

To run OS and Application peacefully. It is very important to have sufficeint memory and temporary disk space.

Normal all Unix works same way.

/var/tmp Application-generated temporary files. This directory generally is not cleared between system reboots.

/tmp System-generated temporary files; generally cleared during the boot operation.

System Administrator important task to watch file system space.

Regards,
Rajesh
Mahesh Kumar Malik
Honored Contributor

Re: 2 temp directories on hpux

Hi Shiv

1. /tmp is used for system generated logs

2. /var/tmp is for application related logs.

Preferred option is to have /tmp

Regards
Mahesh
Bill Hassell
Honored Contributor

Re: 2 temp directories on hpux

As mentioned, /tmp is defined as a system-only directory for temporary files. Unfortunately, old habits never die and many, many applications wrongly put their temp files in /tmp. The design is to have /tmp large enough for temp files created by vi and other system tools, but have all other temp files stored in /var/tmp. /var is (or should be) quite large since there are so many directories that need large space (logfiles, mail, spool files, etc). All applications should (ideally) create and use /var/opt// as a temp storage area just for the application, or at least use a directory /var/tmp/.


Bill Hassell, sysadmin
Ranjith_5
Honored Contributor

Re: 2 temp directories on hpux

Hi Shiva,

/tmp Contains System-generated temporary files, can be used as a space to copy files for time being.

/var/tmp Application-generated temporary files. This also contains temporary files generated by commands in the /usr hierarchy

The /var directory is for multipurpose log, temporary, transient, variable sized, and spool files. The /var directory is extremely variable in size, hence the name. In general, any files that an application or command creates at runtime, and that are not critical to the operation of the system, should be placed in a directory that resides under /var.


Regards,
Syam