WHO?

xiaoxiao2021-03-05  23

WHO? I have known Unix, I will come out these: Name Who - Display Who is on the system

Synopsis WHO [-HMQSTU] [AM I] [file]

Description The Who Utility Displays Information About Currently Logged in Uses. By Default, This Includes the Login Name, Tty Name, Date and Time of Login and Remote Hostname IF Not LOCAL.

The Options Are As Follows:

--H Write Column Headings Above The Output.

-m Show Information About The Terminal Attached To Standard Input Only.

-q `` Quick Mode '': List the names and number of logged in Users in columns. All Other Command Line Options Are Ignored.

-s show the name, line and time fields only. this is the default.

-T Indicate WHETHER EACH User is Accepting Messages. One of the folowing characters IS Written:

User is accepting message. - User is not accepting messages.? An error occurred.

-u show idle Time for Each User In Hours and minutes as hh: mm, `'IF the user has been idle thing what a minute, and` `' '' '' '' '' '' '' '' '' ''

AM I Equivalent to -m.

By Default, WHO Gathers Information from the file / var / run / utmp. An alternate file may be specified for us usually / var / log / wtmp (or /var/log/wtmp.[0-6] depending on site policy as wtmp can grow quite large and daily versions may or may not be kept around after compression by ac (8)). The wtmp file contains a record of every login, logout, crash, shutdown and date change since wtmp was last truncated or created. IF / VAR / LOG / WTMP IS Being Used As The File, The User Name May Be Empty or One of the Special Characters '|', '}' and '~'. Logouts Produce An Out- Put Line Without ANY User Name. For More Information on The Special Characters, See UTMP (5) .environment The Column, Lang, Lc_all and lc_time Environment Variables Affect The Execution of WHO as Described in Environ (7).

FILES / VAR / RUN / UTMP / VAR / LOG / WTMP /VAR/LOG/WTMP.[0-6]

Diagnostics The Who Utility EXITS 0 on success, and> 0 if An error Occurs.

Maybe no one thinks what it is in use, just see who is also above? But I often use it, use it to see someone is still there? I have studied MAN, I found that WHO -U will be more suitable for me, can see if others are in a daze. . . WHO -U | GREP PRENTICE can see the spending basic information of the Prentice, and how long he is in a stay. Prentice TTYP6 APR 14 15:46 23:08 (192.168.11.202) Prentice TTYP7 APR 14 16:07 05:00 (192.168.11.202) Prentice TTYPA APR 14 20:31. (192.168.11.202) Prentice TTYPJ APR 14 17:30 03:20 (192.168.11.202) WHO is read is the system login record file, and my freebsd is / var / log / wtmp. Use WHO [File] to read all login information in the file. As for other parameters, it is useless.

But, Who I AM, DID I HAVE Permission to who you?

转载请注明原文地址:https://www.9cbs.com/read-35407.html

New Post(0)