|Previous||Table of Contents||Next|
The external finger command displays a detailed list of user information. If you specify a user_name, information for only that user is displayed. If no user_name is given, information for all users currently logged in to the system is displayed. By default, only a one-line summary of information is displayed for each user.
The following information is displayed by default:
If you specify user_names, then a full listing of information is displayed for each user you specify. This listing includes:
in addition to the first list of information presented above.
The finger command can also be used to look up user information across a network. Be aware of a time delay for the information to be returned. On a local network it should respond within a few seconds, but it could be longer depending on the network traffic load and the remote system's load.
Following is the general format of the finger command.
finger [ -bfhilmpqsw ] user_name finger [ -l ] "user@host"
|finger [ -l ] [ -m ] [ -p ] [ -s ] [ user_name ] [ last ] [ first ]|
The following list describes the options and their arguments that may be used to control how finger functions.
|-b||Suppress the user's home directory and login shell from a long format display.|
|-f||Suppress the default header from short format displays.|
|-h||Suppress the .project file from a long format display.|
|-i||Display "idle" output format, only the login name, terminal line, login time, and idles time are displayed.|
|-l||Force a long output format. All of the information listed in the two previous lists is displayed.|
|-m||Match arguments only against user names (field one of the /etc/passwd file). By default finger matches the arguments you provide against the username, first names or last names.|
|-p||Suppress the display of the .plan files.|
|-q||Display "quick" output format, only the login name, terminal line, and login time are displayed.|
|-s||Force a short output format. Only the first set of information listed above is displayed.|
|-w||Suppress the full user name from a short format display.|
|Only the -l, -m, -p, and -s options are supported. They have the same meaning as the System V options.|
The following list describes the arguments that may be passed to the finger command.
|first||The first name of a user. finger searches the fifth field of the /etc/passwd file for a match.|
|last||The last name of the user. finger searches the fifth field of the /etc/passwd file for a match.|
|user_name||The name of the user you want information about.|
|user@host||Requests information about a user residing on the system named host.|
|If no user is specified, information is returned for all current users logged into the system.|
DIAGNOSTICS AND BUGS
The finger program only displays the first line of a user's $HOME/.project file, even if multiple lines exist.
If finger seems slow, it may be caused by a large /etc/passwd file. To help speed up finger use the -m option.
Refer to the who command described in Module 159.
The following files are accessed by finger for the required information.
|/etc/utmp||The current who file|
|/etc/passwd||The system's password file|
|/var/adm/lastlog||An administrative file used to track the last login times of users|
|~/.plan||The user's plan. In the academic world this was the major; in business it is usually future projects|
|~/.project||The user's current project|
The finger command provides a quick way to retrieve information about a certain user or all users currently logged into the system. You can use finger to display information about a user you want to contact.
Remember, like any database, the information returned is only as useful as it is current. If you have a good system administrator that keeps the necessary files updated, then finger will prove to be a useful tool. If the data is outdated, finger will be a waste of time for certain information.
In this activity you use the finger command to display information about all current users. Begin at the shell prompt.
In this activity you use finger to display all the information about your user name. Then update your .project file and rerun finger to see the difference.
|Previous||Table of Contents||Next|