put the following line in your root cron

0 4 * * * find /usr/bin/find / -name core -exec rm {} \;

(ie, become root and type the following)
crontab -e
<ctrl-g>
i
0 4 * * * find /usr/bin/find / -name core -exec rm {} \;
<esc>
:wq


What this does is, at 12:04 am (* you can change this*),
find each and every core file on the system and delete
it.

Bill Ward

-----Original Message-----
From: Jukka Lindgren [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 22, 2000 5:57 PM
To: [EMAIL PROTECTED]
Cc: recipient.list.not.shown; @nswcphdn.navy.mil
Subject: Autodelete 'core'


How can I delete any and all 'core' files on my system without user
intervention.

I've seen a script on certain Sparcs at work, it was done with 'awk' or
'grep - or both.. I just can't remember.

Do I start with 'find / -name core' or perhaps 'ls -R core' from the root
and then pipe this to 'grep' or 'awk' and format it as a command to delete
everything found.

Hope you catch my drift... I don't want those huge core files piling up on
my system as I play around with it crashing one program after another. So a
cron job once a day (night, actually) would do the job!
--
Jukka Lindgren
=-= Ja takana säestää Testudo horsfieldi -lauma =-=
[EMAIL PROTECTED]   [EMAIL PROTECTED]
([EMAIL PROTECTED] - työpaikalle)
"I have been known to be wrong..."


--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to