Linux-Last (manual)

Source: Internet
Author: User
Tags ip number sigint signal

LAST,LASTB (1) Linux System Administrator ' s Manual LAST,LASTB (1)



NAME
Last, lastb-show listing of the last logged in users

Synopsis
Last [-R] [-num] [-N num] [-adfiowx] [-f file] [-t YYYYMMDDHHMMSS] [name ...] [TTY ...]
LASTB [-R] [-num] [-N num] [-f file] [-adfiowx] [name ...] [TTY ...]

DESCRIPTION
Last searches back through the file/var/log/wtmp (or the file designated by THE-F flag) and displays a list of all us ERs logged in (and
Out) Since this file was created. Names of users and TTY's can is given, in which case last would show only those entries matching the argu‐
ments. Names of TTYs can was abbreviated, thus last 0 was the same as last tty0.

When last catches a SIGINT signal (generated by the interrupt key, usually control-c) or a sigquit signal (generated by The Quit key, usu‐
Ally Control-\), last would show how far it had searched through the file; In the case of the SIGINT signal last would then terminate.

The pseudo user reboot logs in each of the system is rebooted. Thus last reboot would show a log of all reboots since the log file is
Created.

LASTB is the same as last, except-by-default it shows a log of the file/var/log/btmp, which contains all the bad log In attempts.

OPTIONS

-R suppresses the display of the hostname field.

#不显示登录地址

-num This was a count telling last what many lines to show.

-N num the same. #指定显示的行数


-F File
Tells last to use a specific file instead of/var/log/wtmp.

#使用其他的文件


-T YYYYMMDDHHMMSS
Display the state of logins as of the specified time. This is useful, e.g., to determine easily the WHO's logged in at a particular
Time-Specify that time with-t and look for "still logged in".

Name ... Displays the specified user

    

TTY specified port


-a Display the hostname in the last column. Useful in combination with the next flag.

#将地址栏放在最后一栏系显示

-D for Non-local logins, the Linux stores does not have only the host name of the remote host, but it IP number as well. This option translates the IP
Number back into a hostname.
#使用IP地址格式显示地址, do not use host name (default format)


-F Print Full login and logout times and dates.

-I this option was like-d in that it displays the IP number of the remote host and it displays the IP number in numb Ers-and-dots nota‐
tion.

-O Read an old-type wtmp file (written by LINUX-LIBC5 applications).

-W Display full user and domain names in the output.

-X Display The system shutdown entries and run level changes.

NOTES
The files wtmp and btmp might not be found. The system is logs information in these files if they is present. This is a local configura‐
tion issue. If you want the files to is used, they can be created with a simple touch (1) command (for example, touch/var/log/wtmp).

FILES
/var/log/wtmp
/var/log/btmp

AUTHOR
Miquel van Smoorenburg, [email protected]

See ALSO
Shutdown (8), login (1), Init (8)



Jul, 2004 LAST,LASTB (1)

Linux-Last (manual)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.