File: temp-cleanup.cron

package info (click to toggle)
php-horde 5.2.1%2Bdebian0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 12,196 kB
  • sloc: php: 11,089; xml: 6,460; sh: 96; makefile: 33; sql: 1
file content (41 lines) | stat: -rw-r--r-- 1,486 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh

# This is an example cron job shell script which will clean up any
# temporary files which may get stranded by Horde users in the
# webserver's temporary directory.
#
# You may have to change /tmp to another location depending on your
# configuration.  Other modifications may also be required.
#
# This script is provided as-is and is to be used at your own risk.
# Horde and the authors accept no responsibility for any damages or
# loses caused by this script whether indirect, incidental, or
# consequential,  whether or not such damages could be forseen.
#
# How to use this script will depend on your system.  For some systems,
# it is as simply as putting this file in the /etc/cron.daily directory.
# For others, more or different setup will be required.  See the
# documentation for your systems job scheduler for more information.
#

# The location of PHP's temporary directory
TMP_DIR=/tmp


# MSWord attachments (generated by the MSword viewer)
find $TMP_DIR -type f -name msword\* -ctime +2 -exec rm -f {} \;

# IMP attachments
find $TMP_DIR -type f -name impatt\* -ctime +2 -exec rm -f {} \;

# Klutz temporary files
find $TMP_DIR -type f -name Klutz\* -ctime +2 -exec rm -f {} \;

# Spell checking temporary files
find $TMP_DIR -type f -name spell\* -ctime +2 -exec rm -f {} \;

# VFS temporary files
find $TMP_DIR -type f -name vfs\* -ctime +2 -exec rm -f {} \;

# Files from cancelled imports
find $TMP_DIR -type f -name import\* -ctime +2 -exec rm -f {} \;