Permission: all users.
Syntax
Shell> last [options]
Parameter description:
- -R omitting the field of hostname
- -Num: displays the first num.
- Username: displays the login information of username
- Tty restricted login messages include terminal codes
Instance
Shell> last-R-2
Johnney pts/1 Mon Aug 14 20:42 still logged in
Johnney pts/0 Mon Aug 14 :59 still logged in
Wtmp begins Tue Aug 1 09:01:10 2000 ###/var/log/wtmp
Shell> last-2 minery
Minery pts/0 140.119.217.115 Mon Aug 14)
Minery pts/0 140.119.217.115 Mon Aug 14)
Wtmp begins Tue Aug 1 09:01:10 2000
General display method
# Last
Simple display, and specify the number of displayed
# Last-n 5-R
Root pts/4 Thu May 13 :25 still logged in
Root pts/2 Thu May 13)
Root pts/1 Thu May 13 16:46 still logged in
Root pts/7 Thu May 13 :36 still logged in
Root pts/9 Thu May 13 :35 still logged in
Wtmp begins Thu May 13 18:55:40 2014
Show host IP addresses in the last column
# Last-n 5-a-I
Root pts/4 Thu May 13 :25 still logged in 192.168.1.10
Root pts/2 Thu May 13-() 192.168.1.10
Root pts/1 Thu May 13 16:46 still logged in 192.168.1.10
Root pts/7 Thu May 13 :36 still logged in 192.168.1.10
Root pts/9 Thu May 13 :35 still logged in 192.168.1.10
Wtmp begins Thu May 13 18:55:40 2014