`last` is a command that shows a listing of the last logged in users.
Questions tagged [last]
89 questions
27
votes
4 answers
"Last" command: How to show latest user login?
As I know, the last command shows recent logins by all users. But my PC (CentOS) has been used for roughly a year, and there are many users logged. I tried to used the last command, but it just showed from June 2013 to September 2013.
My question…
Thomas
- 373
- 1
- 6
- 9
23
votes
5 answers
Meanings of the columns in "last" command
As I was investigating a server that is rebooting in a regular fashion, I started looking through the "last" utility but the problem is that I am unable to find what the columns mean exactly. I have, of course, looked through the man but it does not…
Antoine Benkemoun
- 405
- 2
- 4
- 8
20
votes
1 answer
Output of the "last" command
Can anybody explain me what is the meaning of the last column of the output of the last command? I'm particularly interested in its meaning with respect to the reboot pseudo-user.
reboot system boot 2.6.32-28-generi Sat Feb 12 08:31 - 18:09…
Andrea Spadaccini
- 433
- 1
- 4
- 8
18
votes
1 answer
Can't explain "crash" entries in output of the 'last' command
Last shows "crash" at 12:02 and 14:18, but the system didn't stop working at that time. The reboot at 15:03, on the other hand, was to recover from an actual crash - our system stopped responding at 14:46. Why does last show two "crashes" prior to…
Kyle
- 333
- 1
- 3
- 11
17
votes
2 answers
How to know when and which user logged into the system under Mac OS X? Last is not enough!
In Mac OS X, if I don't touch it for a while, it will lock the screen and one must use password to unlock it, but this kind of log in is not recorded by last command. I want to know if anybody tried to break into my MacBook when I am not in front of…
Dwayne
- 273
- 1
- 2
- 6
10
votes
1 answer
Debian - two entries in `last reboot` in `still running`
What can be a reason for last -x reboot showing two last entries as still running? Besides, I'm pretty sure I did not reboot this server December, 16, though it could be something with power on hosting provider. If that was the case, would this be…
Cthulhu
- 205
- 1
- 2
- 9
7
votes
1 answer
How to make `last` shows also suspend/resume times?
I have notebook and want to store information for every day, when computer is running or not (with precise to minutes).
Here is output from last command:
dima tty1 :0 Sat Apr 14 21:56 gone - no logout
reboot system…
diralik
- 227
- 1
- 8
7
votes
1 answer
Understanding the output of last reboot shutdown
When I use the command last -x reboot shutdown I get an output like this:
reboot system boot 2.6.32-279.14.1. Tue Jul 18 22:03 - 03:20 (05:17)
shutdown system down 2.6.32-279.14.1. Tue Jul 18 22:02 - 22:03 (00:00)
reboot system boot …
Karim
- 171
- 1
- 3
7
votes
2 answers
How to find Directories that updated last day in linux?
I have a problem, like I need to find the directories that got updated yesterday. I tried using find command but its listing all the files that got updated in the directories. But I need only the directory names.
vamsi krishna
- 117
- 1
- 2
- 7
6
votes
1 answer
utmp, wtmp and btmp: what is the 'tmp'
From the earlier question:
why are utmp, wtmp and btmp called as they are?
I would like to now what the 'tmp' part is. Is it 'temp/temporary'. As you can see from the earlier question, that part wasn't answered.
bitofagoob
- 1,335
- 2
- 15
- 24
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
- 1
- 12
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…
StationaryTraveller
- 145
- 4
4
votes
1 answer
How to get rid of `mosh` spamming `last -f /var/log/wtmp`?
Ever since I've started using mosh, I'm getting way too many entries in my /var/log/wtmp file of last(1) on a Linux box.
cnst pts/8 172.56.2x.yz via Mon May 19 08:19 still logged in
cnst pts/8 mosh [50892] Mon May 19…
cnst
- 3,223
- 2
- 23
- 44
3
votes
1 answer
What causes wtmp to be cleared?
I noticed that on one of my machines the last command returned nothing. I determined the cause of this to be an empty /var/log/wtmp file. What would cause this to be empty? I assume the "tmp" means temporary, but what and where decides how temporary…
qq4
- 509
- 5
- 12
3
votes
3 answers
how to find lastlog details in solaris
I need the equivalent command of linux lastlog in solaris, need to write a script to find the the users last login date and time in solaris servers. Linux its very easy to fetch using lastlog command.
I tried last -1 USERID , if any user not logged…
judi
- 71
- 1
- 2
- 9