ECN No Name Newsletter: September, 1990

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article]

Using The Finger Command

Jeff Boerio

finger is a command that is very useful in finding out information about other users. The basic information you see when you use the finger command was provided to the system when your account was created. You can update some of the information (see Changing Finger Information on page 13) and add customize "Project" and "Plan" fields that other people will see when they use the finger command seeking information about you.

The formal definition of finger is: finger [options] [name ...] where options and names are optional command-line arguments to the command. By changing the command-line arguments, you can get a listing of information that is useful.

If you don't use any command-line arguments, finger will return a listing of users that are currently logged in on the machine where the command is issued. This listing is printed in the following format: Login ID, the name associated with the login, the TTY they are connected to, how long they have been idle, when they logged in, and where their office might be. The following example shows what happens when finger is used without any command-line arguments on the ei machine.

% finger
Login      Name     TTY   Idle   When    Office    Phone #
gh     George Goble   q1    1d   Tue 08:10 MSEE 104C 49-43545
siphon Cyrus P Dadgar q7   2     Fri 09:00 MSEE 104  49-43376
         |
 28 others listed
         |
marian Marian Hensler q9         Fri 11:13 MSEE 104k 49-44060

If you give a name on the command-line, finger will search through the password file, checking to see if that login ID exists. If it does, information about that user is returned. This information will include

The following example shows what happens when a user fingers my account.

% finger boerio
Login name: boerio            In real life: Jeff Boerio
Office: MSEE 104, 49-44631         Home phone: 49-59206
Directory: /home/orchestra3/boerio      Shell: /bin/csh
Affiliations: ecn@Uid: 2539
Expires: December 1990@Login group: other (1)
Authorized by: jrs

Department: Engineering Computer Network
Classification: Undergraduate Student
Member of groups: forunix, images
On since Aug 31 08:25:49 on console 1 hour 16 minutes Idle Time
Project: I will not skateboard in the halls.
New mail received Fri Aug 31 12:17:22 1990
     unread since Fri Aug 31 2:37:04 1990
Plan:
    "We must attack first.  It's only self defense." - Cleon I

    "There's someone in my head, but it's not me" - Pink Floyd

    "Don't ask me. I'm just improvising." - Rush

This is a fair amount of information. Sometimes, you may not be interested in seeing the complete listing or you may only want to see parts of this information. If you were to use the short output option of finger, the "-s" option, you would see some pretty skeletal information. The following example shows the information that is returned when the user requests a short output when fingering to account root.

% finger -s ghg
Login  Name       TTY    Idle   When         Office  Phone
ghg  George Goble  pb     5d   Tue 09:34 MSEE 104C 49-43545

There is also the quick output format option, "-q". When a login ID is given on the command-line, finger will search the password file and return a quick output of information about that user, as is shown below.

% finger -q root
Login    TTY      When
root          Not Logged In
There is also an idle option, "-i". When used with the quick output option, the following information is returned. (This is an example of a single user working with multiple windows on a Sun workstation.)
% finger -q -i
Login     TTY     When            Idle
boerio  console Fri Aug 31 08:25  1 hour 11 minutes
boerio  ttyp0   Fri Aug 31 08:26  23 minutes
boerio  ttyp1   Fri Aug 31 08:26
boerio  ttyp2   Fri Aug 31 08:28
boerio  ttyp3   Fri Aug 31 08:28  1 minute 58 seconds

You can also suppress the printing of the .plan and .project files by using the -p and -h options, respectively. By using both options, the following information is returned.

% finger -h -p boerio
Login name: boerio           In real life: Jeff Boerio
Office: MSEE 104, 49-44631        Home phone: 49-59206
Directory: /home/orchestra3/boerio     Shell: /bin/csh
Affiliations: ecn                            Uid: 2539
Expires: December 1990          Login group: other (1)
Authorized by: jrs

Department: Engineering Computer Network
Classification: Undergraduate Student
Member of groups: forunix, images
On since Aug 31 08:25:49 on console 1 hour 19 minutes Idle Time
No unread mail on this host.

It is possible to finger accounts on other hosts by typing "finger login@host" or simply to finger the machine in general by typing "finger @host". In these two cases, there will be an additional message that tells you when you have connected to the host. Note that the "-h" and "-p" options will not work when fingering accounts across the network.

% finger Julie@ea
[ea.ecn.purdue.edu]
Login name: julie         In real life: Julie A Dickinson
Office: MSEE 104
Directory: /a/julie                       Shell: /bin/csh
Affiliations: ecn                               Uid: 5469
Expires: May 1991                  Login group: other (1)

Authorized by: marian
Department: Engineering Computer Network
Classification: Undergraduate Student
On since Aug 31 12:39:40 on tty1a
   7 minutes 39 seconds Idle Time
New mail received Thu Aug 30 16:21:24 1990
     unread since Thu Aug 30 13:38:27 1990
No Plan.

Plan files and project files are nice ways of describing what you're doing or who you are. As I hinted above, these files are in your home directory and are called .plan and .project, respectively. You can create and edit these files using your favorite editor. However, the output from a project file is restricted to one line and the output from plan files is restricted to 24 lines. It is also strongly recommended that these files remain plain text files without any graphics sequences. This is because people using various types of terminals may finger your account and the escape sequences you use may not match the screen-handling codes of the user's terminal.

As you can see, there are a variety of options and output formats for the finger command. Using these options can produce some useful information about who is logged on to a machine and what they have been doing.


webmaster@ecn.purdue.edu
Last modified: Friday, 24-Oct-97 11:59:13 EST

[HTML Check] HTML