last
is a command that shows a listing of the last logged in users.
Questions tagged [last]
89 questions
5
votes
1 answer
What is the purpose of the 10th column of the `last` command's output?
I see a suspicious pattern in a last command output on RHEL:
$ last reboot
reboot system boot 3.10.0-514.21.1. Wed Dec 13 10:25 - 11:53 (01:28)
reboot system boot 3.10.0-514.21.1. Mon Oct 30 16:23 - 11:53 (43+20:30)
reboot system boot…

boardrider
- 252
4
votes
1 answer
Where does 'last' store user hostnames?
I was looking into: 'last -d' command.
-d: For non-local logins, Linux stores not only the host name of the remote host but its IP number as well. This option translates the IP number back into a hostname.
At first, I was looking at similar…
3
votes
1 answer
Difference between last and lastlog?
last | grep IPADDRESS
doesn't shows any line, but:
lastlog | grep IPADDRESS
does. Why?
3
votes
0 answers
getting last logins since $time
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…

Kiksy
- 253
2
votes
1 answer
'last -d' is REALLY slow
I can run the command last (and last -i) in a fraction of a second, but when I run last -d, according to my tests, it takes a whopping 5 minutes and 22 seconds.
Just for reference, this is what adding the -d flag does:
-d For non-local…

IQAndreas
- 10,345
2
votes
2 answers
Linux Last command weird output? Garbage for IP address
This was a weird output I came across. Running the "last" command gave me this output
gryphon pts/0 192.168.0.108 Wed Mar 19 21:04 still logged in
gryphon pts/0 s0106d850e695678 Wed Mar 19 13:53 - 13:54 (00:01)
gryphon pts/0 …

Cody
- 245
1
vote
0 answers
Command ‘last’ - problems
I have this problem using the command ‘last’. My task is to find names of people, that have been logged in at night hours (22:00 - 5:00). So I’ve tried to save the first number (22) to a variable and wanted to compare, but it doesn’t work at…

Tamara123
- 11
0
votes
1 answer
What causes multiple simultaneous shut down times in 'last' command output?
I am troubleshooting some outage issues on a server, with the suspicion that the server is restarting intermittently. When I run the last command, I see the following output (I added line numbers for clarity):
01. root@nina-xms-dev:/home/nina#…

ninapavlich
- 101
0
votes
1 answer
running "last" printed suspicious output
I invoked
last
from bash on my personal computer and I have this output
user pts/2 :0 Wed Jul 27 09:15 still logged in
user pts/1 :0 Wed Jul 27 09:13 still logged in
user pts/0 …

quester
- 273