Devdas Bhagat wrote:
>
> Run it as a cron job. Put the who command in the crontab file, with time set
> for two minutes. Output with 'tee' so that you get shell output, or simply
> redirect the output to a text file, mail the file to a specified user at
> regular intervals.
>
> Devdas Bhagat
Err, what was this about?
If you're looking for maintaining logs of who's used the system, the
last command is a better tool. It reads entries from the /var/log/utmp
file, which is set to be rotated everyone one month. You can symlink to
last from /etc/cron.hourly and set utmp to be rotated once a day in
/etc/logrotate.conf. last will be executed before logrotate because 'la'
comes before 'lo' when sorted alphabetically. cron will take care of
e-mailing output to root.
--
Kiran Jonnalagadda
http://lunateks.com
baby.sh: while true; do echo "^G^G^G^G^G"; sed -e 's/food/poop/'; sync;
sync; sleep 15; done
To subscribe / unsubscribe goto the site www.ilug-bom.org ., click on the mailing list
button and fill the appropriate information
and submit. For any other queries contact the ML maintener