last
时间:2006-08-13 来源:anima
last
last [options] [username] [ttynumber]
Display a list of the most recent logins, taken from the file /var/log/wtmp by default. If you specify a tty number or username, the output will display only the logins for that user or terminal.
Options
-n number, -numberChoose how many lines of logins to display. Thus, last -7 or last -n 7 displays seven lines.
-RDo not show the hostname from which logins originated.
-aDisplay the hostname from which logins originated.
-dDisplay both IP address and hostname.
-f filenameGet the list of logins from a file you choose. The default source is /var/log/wtmp.
-iDisplay IP address and hostname. Display the IP address in the numbers-and-dots notation.
-oRead an old-style (libc5 application) wtmp file. Not likely to be useful on newer systems.
-xDisplay shutdown messages and runlevel messages.