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: