1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $Id: 100.clean-disks,v 1.1.1.1 1997/08/12 17:51:15 pst Exp $
| 3# $Id: 100.clean-disks,v 1.1.1.1 1997/08/16 17:04:00 pst Exp $
|
4#
| 4#
|
5# This is a security hole, never use 'find' on a public directory 6# with -exec rm -f as root. This can be exploited to delete any file 7# on the system. 8#
| |
9 10exit 0 # do not run by default 11 12find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ 13 \( -name '[#,]*' -o -name '.#*' -o -name a.out -o -name '*.core' \ 14 -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
| 5 6exit 0 # do not run by default 7 8find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ 9 \( -name '[#,]*' -o -name '.#*' -o -name a.out -o -name '*.core' \ 10 -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
|
15 -a -atime +3 -exec rm -f -- {} \;
| 11 -a -atime +3 -delete
|
| |