Xref: utzoo news.newusers.questions:416 unix-pc.general:3634 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!lanl!topgun.dspo.gov!ames!uakari.primate.wisc.edu!indri!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: news.newusers.questions,unix-pc.general Subject: Re: expire in /usr/lib/crontab Message-ID: <1989Aug26.212620.16242@twwells.com> Date: 26 Aug 89 21:26:20 GMT References: <51@docwrk.UUCP> Followup-To: comp.unix.questions Distribution: usa Organization: None, Ft. Lauderdale, FL Lines: 46 In article <51@docwrk.UUCP> srh@docwrk.UUCP (Steven R. Houser) writes: : I run expire on a daily basis to clear my 7300 of old news. Is it possible : to put expire in /usr/lib/crontab so old news will get deleted : automatically? If so, what should the line in /usr/lib/crontab look like? A better place to have posted this question would have been comp.unix.questions and I have directed followups there. Anyway, here's your answer: Yes. And you should. I'm presuming that you know how crontab entries are formatted. If not, go read the cron (and crontab if you have the program) manual pages. These may be available online. Anyway, you will have one of two kinds of cron: 1) Your system has only one crontab file and cron is not normally available to unprivileged users. 2) Your system has a separate crontab file for each user. Users are allowed to have crontabs provided that you have set up certain permissions correctly. Also, you either do or do not run your expire command as root. There are two possibilities: 1) If you run expire as root, it doesn't matter which kind of cron you have. Or if you have a separate crontab for each user, the line would look something like: 15 6 * * * You would place this in the one crontab (if that is what you have), or in the crontab for the user you want to run the expire under (normally news). 2) If you have only one crontab but want to run the expire under a user name other than root, the line would look something like: 15 6 * * * su --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com