Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.hp.hpux FAQ
Section - 5.11.2 What's a good strategy for clearing /tmp and /var/tmp?

( Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Neighborhoods ]


Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.11.1 How can I track log files and core files?
Next Document: 5.12 Software Management
See reader questions & answers on this topic! - Help others by sharing your knowledge

Run the below shell script from root's crontab:

  #!/bin/sh
  DAYS=7
  DIRS="/tmp /var/tmp"
  find $DIRS -depth -fsonly vxfs -fsonly hfs -atime +$DAYS \
  -exec rm -rf {} \;

The -depth option ensures no directory is removed before its contents,
-fsonly options are to avoid attempting        ttttttttto remove files
beneath NFS or
CDFS mountpoints that might exist.

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.sys.hp.hpux FAQ
Previous Document: 5.11.1 How can I track log files and core files?
Next Document: 5.12 Software Management

Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hpux.faq@gmail.com





Last Update March 27 2014 @ 02:11 PM