*BSD News Article 12624


Return to BSD News archive

Xref: sserve comp.unix.admin:9639 comp.unix.bsd:11672 comp.unix.wizards:28870 alt.unix.wizards:122
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!flash.pax.tpa.com.au!flash.pax.tpa.com.au!not-for-mail
From: hart@flash.pax.tpa.com.au (Leigh M Hart)
Newsgroups: comp.unix.admin,comp.unix.bsd,comp.unix.wizards,alt.unix.wizards
Subject: Re: How does finger get info about mail???
Date: 14 Mar 1993 18:07:54 +0930
Organization: PAX - Public Access Unix (Adelaide)
Lines: 37
Message-ID: <1nuqt2INNjb3@flash.pax.tpa.com.au>
References: <1993Mar14.000449.24954@llyene.jpl.nasa.gov>
NNTP-Posting-Host: flash.pax.tpa.com.au

robert@triton.Jpl.Nasa.Gov (Angelino) writes:

>BACKGROUND:
>	SunOS 4.1.2. SPARC 2.

That's cute, I have a solid steel blue background on my Xterm :)

>	When I do a "finger username" I get some nice goodies about 
>username.  One thing I'm baffled about is the mail information it
>displays.  How does it do this??  The manual pages say the following:
> 
> [man page deleted, we all know what they look like!]
>
>What process does finger go through to get the mail information??  Does
>it look at the access time of /var/spool/mail/username or is it getting
>it from somewhere else??

Each file in a unix filesystem has a few statistics as well as the data.
two such stats, are the time_last_accessed and time_last_modified stats.

>From this, finger or fingerd (the finger daemon for remote fingering)
stats the file, gets the two times and works out what the user has
in regards to mail waiting/read/unread etc.  Essentially, you answered
your own question.  

>-curious

Didn't that kill the cat? (kill -9 %cat)

You now have 8 lives left.  Don't waste any more :)

Leigh
-- 
Leigh M Hart                     _-_|\
C/- PO Box 758                  /     \                     hart@pax.tpa.com.au
North Adelaide 5006             \_.-* /
AUSTRALIA                            v                     Work: +61-8-267-5966