- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Files and directories in /tmp and /var/tmp and...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 04:41 AM
тАО10-08-2009 04:41 AM
I have a very fundamental question.
Why are there two seperate directories /tmp and /var/tmp in HP-UX?
what is the difference and the importance of these two directories?
How important are the files and directories in these directories for the working of the HP-UX OS (11iv1, 11iv2 and especially 11iv3 if there are any chnages)
Is it a normal system maintenance activity that these directories (both /tmp and /var/tmp are cleaned off? (including the directories and the files in these directories)
Is it ok for applications to depend heavily on these applications (stack not coming up if these files/directories in /var/tmp and /tmp are cleaned up, etc...)
What would be the very good way to warn end users not to delete any files or directories in these directories(through login banners or any other means)
Thank you very much for your time and patience.
Kind Regards,
Satya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 05:00 AM
тАО10-08-2009 05:00 AM
Solution> Why are there two seperate directories /tmp and /var/tmp in HP-UX?
The '/tmp' directory is intended to be reserved for use by system processes, while the /var/tmp' directory is targeted to _application_ use.
> How important are the files and directories in these directories for the working of the HP-UX OS (11iv1, 11iv2 and especially 11iv3 if there are any chnages)
Well, the directory's are expected to be present; particularly '/tmp'.
> Is it a normal system maintenance activity that these directories (both /tmp and /var/tmp are cleaned off? (including the directories and the files in these directories)
You can optionally cleanup these directories during startup by configuring '/etc/rc.config.d/clean_tmps'.
> Is it ok for applications to depend heavily on these applications (stack not coming up if these files/directories in /var/tmp and /tmp are cleaned up, etc...)
Cleaning up the directories at startup avoids problems, though you may not want to do this if you place patch depots in '/tmp' and expect them to be present for any period.
> What would be the very good way to warn end users not to delete any files or directories in these directories(through login banners or any other means)
I wouldn't expect users to read any banners, etc. Humans have a great capacity to ignore the familiar. Instead, you can set the "sticky bit" on the directories. Setting this bit means that only the owner of a file in the directory has the right to remove it.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 05:00 PM
тАО10-08-2009 05:00 PM
Re: Files and directories in /tmp and /var/tmp and their importance for system functionality
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 06:40 PM
тАО10-08-2009 06:40 PM
Re: Files and directories in /tmp and /var/tmp and their importance for system functionality
If you need to store large files on a temporary basis and don't have enough room in your quota for them, you might consider using /var/tmp and /tmp on the shell hosts. These directories are available to you and the data stored there does not count against your quota.
Here's what you need to know about /var/tmp and /tmp:
/var/tmp and /tmp are shared space, and are used by numerous commands as a matter of course. It is your responsibility to make sure that your use of the space does not interfere with others' responsible use of the system.
Unlike unlike your home and web directories, /tmp and /var/tmp are separate and discrete across the Panix userhosts. So, if you put a file into /tmp on panix1, it will not be accessible on panix2, panix3, or panix5.
Files in /tmp and /var/tmp are removed after 30 days, regardless. If you need to keep a large file for longer than that, you should make arrangements to purchase more disk space.
There are differences between /var/tmp and /tmp:
The basic difference is that anything in /tmp is deleted when the machine reboots. (This is rare, but both scheduled and unscheduled reboots happen, so if you need short-term survival of a file, put it in /var/tmp.
Notwithstanding, files in /var/tmp on a particular machine might be destroyed if there is a hardware failure, system upgrade, observation by staff that we're low in space in /var/tmp on a particular box, or any other maintenance. (Again, this is rare, but it means that you cannot count on files stored in /var/tmp either.
/var/tmp and /tmp are not necessarily the same size on the different machines, and are likely to have different amounts of space available (depending on what other users have stored there). Please check (use df) before using space there.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 10:42 PM
тАО10-08-2009 10:42 PM
Re: Files and directories in /tmp and /var/tmp and their importance for system functionality
Many thanks for your patience in answering all the queries.
I need some clarifications.
When you mean "files" in your reply, I should take the general unix convention to also imply directories that are created in /tmp and /var/tmp Right?
On a 11iv3 system, i have the following for /etc/rc.config.d/clean_tmps file on my system. Can I be sure that this will clean up not only /tmp but also /var/tmp? Is it a bug/oversight in comments of the script file or by design? I learnt from other thread that /var/tmp will not be cleaned and that we need to edit the script /sbin/init.d/clean_tmp to add that functionality.
#!/sbin/sh
# @(#)B.11.31_LR
# List and/or clear temporary files
#
# LIST_TEMPS: Set to 1 to produce a listing of temporary files at startup.
#
# CLEAR_TMP: Set to 1 to remove all files from /tmp at startup.
#
LIST_TEMPS=1
CLEAR_TMP=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2009 02:07 AM
тАО10-09-2009 02:07 AM
Re: Files and directories in /tmp and /var/tmp and their importance for system functionality
Currently, the settings in /etc/rc.config.d/clean_tmp:
LIST_TEMPS=1
CLEAR_TMP=0
will only list the files. I would change this to:
LIST_TEMPS=1
CLEAR_TMP=1
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2009 02:43 AM
тАО10-09-2009 02:43 AM
Re: Files and directories in /tmp and /var/tmp and their importance for system functionality
In UNIX every thing is defined as a file.
If your /tmp getting full better ask the file owner to delete his/her file which is in /tmp
/var/tmp do not delete any file from there when you reboot your system it will automaticly clear.
Suraj