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

last -t lists all entries in wtmp


For a monitor script I thought I'd use the -t switch of the last command
hoping to get only the latest entries from wtmp. Seems there's something
wrong there, since it will return all entries in wtmp regardless. Before
I submit a bugreport I'd like to know if anyone on the list has noticed
the same.

The exact command I used is "last -t 20050721000000" on a host running
Etch (updated today, but it happened before the upgrade as well).

Another weird thing "last -t 2005072000000" will work without an error
(note this is YYYYMMDDHHMMS<- not SS). Cutting off a second digit from
the end will result in an error (as I'd expect). Using another time
instead of midnight shows the same behavior (so it's not specific for
the zeros).

A last experiment (pun intended) with "last -x" returned all entries in
wtmp too and not just the runlevel changes... not what I expected from
reading the manpage.

Could someone confirm this for me before I go bark against some tree in
the BTS please?

Sincerely HdV

Reply to: