Introduction to Linux: ac commands in Linux

Source: Internet
Author: User
Tags exit in

Introduction to Linux: ac commands in Linux

The ac command in Linux reports the user connection time based on the logon entry and exit in the current/var/log/wtmp file. The default value is hour. If no user ID is used, the total time is reported.

Its main parameters include:

(1)-d displays the connection time of each day.

(2)-p displays the connection time of each user.

For example, enter the ac command and press enter to display the following content:

[Root @ bkjia/] # ac
Total 496.35 type the ac-d command, and then press the Enter key to display the total connection time of the day:

Aug 12 all 261.87
Aug 13 total 351.39
Aug 14 Overall 396.09
Aug 15 total 462.63
Aug 16 total 270.45
Aug 17 total 104.29
Today total 179.02

Enter the ac-p command and press enter to display the total connection time of each user:

[Www.bkjia.com @ bkjia ~] $ Exit
Logout
[Root @ bkjia/] # ac-p
Tom 0.32
Root 496.05
Total 496.37
[Root @ bkjia/] #

This article permanently updates the link address:

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.