Functions of the last command in CentOS

Source: Internet
Author: User
In CentOS, the last command is used to display the logon status of recent users or terminals. its permission is granted to all users. Run the last command to view the log of the program. The administrator can find out who has tried or attempted to connect to the system. Format: [plain] viewplaincopylast & nb

In CentOS, the last command is used to display the logon status of recent users or terminals. its permission is granted to all users. Run the last command to view the log of the program. The administrator can find out who has tried or attempted to connect to the system.

 

Format

 

[Plain]View plaincopy
  1. Last [-R] [-n] [-f file] [-t tty] [-h node] [-I-IP] [-1] [-y] [ID]

Parameter description [Plain]View plaincopy
  1. -R: The field of hostname is omitted.
  2. -N: number of output records.
  3. -F file: specifies that the file is used as the log file for query. (The default value is/var/log/wtmp, and/var/log/btmp can display remote login)
  4. -T tty: only the logon status on the specified Virtual Console is displayed.
  5. -H node: only the logon status on the specified node is displayed.
  6. -I IP: only the logon status on the specified IP address is displayed.
  7. -1: use an IP address to display the remote address.
  8. -F: displays the year, month, and day of the record.
  9. -ID: the user name to be queried.
  10. -X: displays the system shutdown, user logon, and logout history.

Related Article

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.