- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to clean files in /tmp dir while reboot
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
Forums
Discussions
Discussions
Discussions
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
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
01-16-2003 08:06 PM
01-16-2003 08:06 PM
How to clean files in /tmp dir while reboot.
Will it clean every thing in that dir or
what kind of files and dir will it clean ?
Thanks
R. Exhil
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2003 08:08 PM
01-16-2003 08:08 PM
Re: How to clean files in /tmp dir while reboot
It cleans crashed files of editors and recovers them. It won't touch anything other than that.
The file that does this job is /sbin/init.d/clean_ex. Run it manually before rebooting the server if it has been up and running for a long time just before rebooting the box.
/sbin/init.d/clean_ex start.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2003 08:16 PM
01-16-2003 08:16 PM
Re: How to clean files in /tmp dir while reboot
it uses /etc/rc.config.d/clean_tmps to determine whether or not to turn on as the system is coming up and is run at the /sbin/rc2.d (S204clean_tmps on my system)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2003 08:19 PM
01-16-2003 08:19 PM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2003 08:30 PM
01-16-2003 08:30 PM
Re: How to clean files in /tmp dir while reboot
rm -rf !(lost+found) in /tmp - blowing away everything in there except for lost+found. So if your server panics and reboots, it WILL erase everyting in /tmp - including things that you might have wanted to keep. Which is the reason the default setting in /etc/rc.config.d/clean_tmps is:
LIST_TEMPS=1
CLEAR_TMP=0
By the way, LIST_TEMPS=1 is what causes the /tmp listing in your /etc/rc.log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2003 08:46 PM
01-16-2003 08:46 PM
Re: How to clean files in /tmp dir while reboot
A good approch would be deleteing old file depending on your requirement.
something like
find /tmp -type f/d -mtime +35 -exec rm -fr {} \;