*BSD News Article 23787


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!extro.ucc.su.OZ.AU!matth
From: matth@extro.ucc.su.OZ.AU (Matthew Hannigan)
Subject: Re: Time tracking
Message-ID: <matth.753177384@extro.ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: extro.ucc.su.oz.au
Organization: Information Services, Sydney University, Sydney, NSW, Australia
References: <2aukp0$241@galaxy.ucr.edu> <2bsgnk$gm3@u.cc.utah.edu>
Date: Sat, 13 Nov 1993 07:56:24 GMT
Lines: 30


In article <2aukp0$241@galaxy.ucr.edu> duchow@galaxy.ucr.edu (John Duchowski) writes:
>Hi, I would like to find out how can one set up time tracking on unix,
>similar to that which one obtains when one does:
>
>	 $ logout/full
>
>on VMS.  I would like to do this in order to keep track of the time
>I spend signed on, because my Unix connection happes to be over a long
>distance line and I would like to minimize the associated costs.

I put the command 'time' in my .logout file, as well as append the
results to a .log file which I periodically review.

My complete .logout file:
	date >> ~/.log
	time >> ~/.log
	clear
	time
	sleep 1

This only works for csh, of course.  For the Bourne shell
and derivative you'll have to trap the hangup signal.
	trap '$HOME/.logout' 1
or similar.

--	
	-Matt