DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

cleantmp(ADM)


cleantmp -- remove temporary files in directories specified

Syntax

/usr/lib/cleantmp [ -d ]

Description

cleantmp removes temporary files in directories specified in /etc/default/cleantmp under the variable TMPDIRS. By default, /tmp and /usr/tmp are examined. Users can add to the list of directories, separating each directory with a space.

Files in these directories which are not accessed within the last n days will be removed, where n is the number of days specified under the variable FILEAGING in /etc/default/cleantmp. By default, FILEAGING is 7. Users can change the number of days for FILEAGING.

/usr/lib/cleantmp is run as a cron job every day at 3:00 a.m. Refer to /usr/spool/cron/crontabs/root on the system. The superuser can edit this file to change the frequency and time at which /usr/lib/cleantmp is run. If the directories specified do not exist or if they are mount points and the filesystem is not mounted, cleantmp will send mail to root saying that the directory does not exist.

If FILEAGING is specified as a number less than zero, all files will be removed each night; in this case, cleantmp sends its error log messages to the system console (/dev/console).

The format of /etc/default/cleantmp is as follows:

FILEAGING=n
TMPDIRS=temp_dir ...

cleantmp accepts the following option:


-d
Remove any directories in the directories specified by TMPDIRS that have not been modified for FILEAGING days if they are empty or become empty because their contents have been removed by cleantmp.

Files

/etc/default/cleantmp

See also

rc2(ADM)

Standards conformance

cleantmp is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003