I want to get last logins from a certain date using last
Running
last -f /var/log/btmp -t 20140723123000
Always shows my whole lastb log.
This:
last -t 20140723123000
Shows my whole last log. eg:
bob pts/1 172.16.14.37 Thu Feb 27 09:38 - 09:56 (4+00:18)
tim pts/1 172.16.14.37 Wed Feb 19 11:32 - 09:34 (7+22:02)
root pts/1 172.16.14.37 Mon Feb 17 09:50 - 12:04 (1+02:14)
The manual seems to say "Display the state of logins as of the specified time"
There is no year outputted, is this an issue?
Update:
Red Hat 5.5
Running last -V returns : last: invalid option -- V (running man last shows no -V option)
Running last -s returns : last: invalid option -- s (running man last shows no -s option)
-Fas the manual suggests to get full information. – Valentin Bajrami Jul 23 '14 at 12:16last -VAlso, have you looked at the-sflag? What system are you running? – Valentin Bajrami Jul 23 '14 at 13:09last -t 20140723123000do I get logins from January, March etc. – Kiksy Jul 23 '14 at 13:24-t, --until timeoption is untill the specified time not-s, --since timewhich is what you want imo. Can you pastebinman lastsomewhere? – Valentin Bajrami Jul 23 '14 at 13:26lastthat is. It seems to be a fork or something. I've looked at mine and also here http://manpages.courier-mta.org/htmlman1/last.1.html Both discuss the-sflag. – Valentin Bajrami Jul 23 '14 at 14:22