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

Re: last -t lists all entries in wtmp

J.A. de Vries wrote:

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?

I just made a test run and the output looked fine giving the log from that moment and older as I would expect. I also tried YYYYMMDDHHMMS with the same result. And with YYYYMMDDHHMM it barfs like it did for you.

The test was done on a laptop which currently have Ubuntu 5.04 running. The version of sysvinit package is 2.86-5ubuntu6.

Why is this on debian-security by the way?

// Tomas

Reply to: