[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: last -t lists all entries in wtmp



On Fri, 2005-07-22 at 13:03 +0000, J.A. de Vries wrote:
> On 2005-07-22 @ 00:13:38 (week 29) michael wrote:
> 
> > I think it's a question of interpretation of the man pages. To me it
> > seems that '-x' *also* gives the runlevel info; and that '-t' gives all
> > entries *up to* a date (as opposed to since or on that date)....
> 
> Here's the two relevant excerpts from the manpage:
> 
> -t YYYYMMDDHHMMSS
>        Display the state of logins as of the specified time.
>        This is useful, e.g., to determine easily who was logged
>        in at a  particular time -- specify that time with -t and
>        look for "still logged in".
> 
> -x     Display the system shutdown entries and run level changes.
> 
> I am sorry, I am not a native speaker like yourself (judging from your
> email address). To me "as of" meant logins starting from the given time
> and later. 


To me it means, upon re-reading, that it is doing a 'last' as of the
YYYYMMDDHHMMSS ie if you had done last at time T then 'last -t T' (at
some later date) gives you the same info.


> As for -x returning changes in runlevel as well you are right. I just
> did a diff between two runs (on with and one without -x) and indeed both
> show shutdown entries, but using -x gives lines like "runlevel (to lvl
> 2)   2.6.8-2-386      Sun Jul 17 11:58 - 14:49 (5+02:51)" as well.
> 
> Thanks for making me see. I learn every day... `;-)
> 

So I think the 'man' page is indeed correct, although maybe not as clear
as it could be

M



Reply to: