How to Use the Which Utility

Use the Which utility to view the name of the first file encountered while traversing a path or directory tree.

To Access Which from the Dashboard

To run Which from the Support Tools Dashboard:

1.Use the System Select screen to select the system you want to work with.

2.From the Dashboard menu, select Cisco Common Tools > Which.

3.In the Arguments field, enter desired arguments, as described in the Using section below.

Note: When entering arguments, the which command is already implied. Do not enter it in the Arguments field.

4.Specify the command duration time or accept the default (60 seconds). This is the amount of time the command will attempt to run before terminating.

5.If desired, check Elevate Command Priority. This ensures the command will run regardless of the level of server activity.

6.Click the Run button.

Using Which

Syntax

which [ -a? ] [ -p <environment variable> ] file1 ...

Command Line Options

Which will print the full pathname of the first occurrence of a file found in the current directory or along a given path. The default path is the value of the environment variable PATH. If the filename does not have an extension, which will print the first occurrence of <file>.com, <file>.exe, <file>.bat, or <file>.cmd, in that order (unless the environment variable PATHEXT is set, in which case its list of extensions is used.)

Cisco Support Tools 1.0 User Guide

How to Use the Which Utility 273

Page 273
Image 273
Cisco Systems 1.0 (1) manual How to Use the Which Utility, To Access Which from the Dashboard, Using Which