[I'm assuming we are talking about machines with multiple users]
That's much better than what the original adminstrator did, which can
only be described as being somewhere between idiocy and incompetence.
However, it still has problems:
1. It *tries* to remove directories, leading to spurious email. Fix
this with a "-type f" in the find arguments.
2. Core files are created for a reason. They may contain useful data
that someone might want to look at in a post mortem debugging session.
Such people will be annoyed if they find the files deleted. The usual
fix for this is to only nail core files that have not been accessed in
a while (say, a week). Try "+atime 7" in the find arguments.
3. If you allow users to mount removable media, such as floppy, zip,
or jaz, you probably don't want to delete core files on those. Fix
this by having separate crontab entries for each normally mounted
filesystem (e.g., "find /home ...") and using the "-xdev" argument
to tell each find to not cross filesystem boundaries.
--Tim Smith
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/