Linux finger command and examples(What is, Concept and Definition)
On Unix-like operating systems, the finger command searches for and displays information about system users.
Syntax
finger [-lmsp] [ user ...] [ user @ host ...]Options
| -s | Displays the user's login name, real name, terminal name, and write status (such as " * " after the terminal name if write permission is denied ), idle time, login time, office location, and office phone number. Login time is displayed as month, day, hours, and minutes, unless whether it is more than six months ago, in which case the year is displayed instead of the hours and minutes. Unknown devices as well as non-existent idle and login times are shown as unique asterisks. |
| -l | Produces a multi-line format that displays all the information described for the -s option, as well as the user's home directory, the home phone number, the login shell , the mail status and content of the ".plan", ".project", ".pgpkey" and ".forward" files in the user's home directory. Phone numbers specified as eleven digits are printed like " + N-NNN-NNN-NNNN ".Numbers specified as ten or seven digits are printed as the appropriate subset of that string.Numbers specified as five digits are printed as " xN-NNNN ".Numbers specified as four digits are printed as" xNNNN ". If write permission is denied on the device, the phrase" (messages disabled) "is added to the line containing the device name.One entry per user is displayed with the option -l ; if a user logs in multiple times, the terminal information is repeated once per login. Mail status is displayed as " No mail." if there is no no mail " Mail last read DDD MMM ## HH: MM YYYY (TZ) " if the person has looked at your mailbox since a new mail arrived, or "New mail received..." , "Not read since..." if you have new mail. |
| -p | Prevents the -l option from finger from displaying the content of ".plan ", ".project files "and" .pgpkey ". |
| -m | Prevents matching of usernames. user is usually a login name; however, the match will also be performed on the real names of the users, unless the -m option is provided.All finger name matches are not case sensitive. |
If no options are specified, the finger defaults to the -l style output if operands are provided, otherwise to -s style.Please note that some fields may be missing, in any format, if the information is not available to them.
If no arguments are specified, finger will print an entry for each user currently connected to the system.
Finger can be used to search for users on a remote machine.The format is to specify a user such as " [protected email] " or " @host ", where the default output format for the former is -l , and the default output format for the latter is the -s style.The -l is the only option that can be passed to a remote machine.
If the standard output is a socket, finger will issue a carriage return ( ^ M ) before each line break ( ^ J
Comments
Post a Comment