[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#3114: cron.daily/standard script



>>>>> "MM" == Michael Meskes <meskes@informatik.rwth-aachen.de> writes:

MM> Would it be a good idea to add a line like
MM> find / -xdev -type f -name core -atime 7 -exec /bin/rm {} \;
MM> to /etc/crontab?

Please don't do that. Wheras no sane person with any UN*X experience
would name a file `core', how can you be sure than you ordinary user
doesn't do that (maybe in a list which identifies the core-group of a
team of developers)? I have seen a lot of people writing `test'
programs - which, depending on the value of PATH, might break shell
scripts using test instead of [. So you can't rely on the name of the
file to know that it is really a core dump. At least check that the
file has the right magic number and make a backup before removing any
file - especially if it is part of /home.

			Cheers,
				Lukas
--------------------------------------------------------------------------
Es gibt kein idiotensicheres System, denn Idioten sind zu erfindungsreich.
(anon)
--------------------------------------------------------------------------


Reply to: