expire in /usr/lib/crontab
T. William Wells
bill at twwells.com
Sun Aug 27 07:26:20 AEST 1989
In article <51 at docwrk.UUCP> srh at 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 * * * <path to expire> <whatever expire arguments you like>
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 <user> <path to expire> <expire arguments>
---
Bill { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com
More information about the Unix-pc.general
mailing list