The stmpclean utility removes old files (and old empty directories) from the specified directory. It is meant to be used to clean directories such as "/tmp" where old files tend to accumulate. stmpclean never removes files or directories owned by root, which is a feature, not a bug. Great care is taken while descending into the directory, and the operation is secure. Anything that's not a directory, regular file, or symbolic link is also left alone (because programs like screen(1) create sockets and FIFOs under /tmp and expect them to be long-lived). Unlike other programs that do the same task, stmpclean never forks and consumes limited amount of memory. If stmpclean determines a race condition it will log the situation and exit with a failure.
|Tags||Security Systems Administration Filesystems Operating Systems Linux Distributions|
|Operating Systems||POSIX BSD Linux Unix|
Release Notes: stmpclean refuses to run on relative pathnames (no need, and potentially disastrous consequences).
Release Notes: Only regular files and empty directories are deleted now. The System V sete[ug]id sequence is now supported. Hardlinked files are no longer deleted. Files with recent ctime are not deleted.