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

Re: last -t lists all entries in wtmp



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. It seems here it meant logins from the given time and older.

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... `;-)

Grx HdV



Reply to: