home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / fileutil / whereis / whereis.doc next >
Encoding:
Text File  |  1993-11-28  |  4.3 KB  |  102 lines

  1. Yes, yet another command-line file find utility. This one is 32-bit so it only
  2. works with OS/2 2.0 and higher. If you need a 16-bit version, contact me at my
  3. Compuserve id 72251,750 and I'll E-Mail you one.
  4.  
  5. All options will be displayed by invoking WHEREIS without any command-line
  6. parameters. You will get the following screen:
  7.  
  8. -------------------------------------------------------------------------------
  9. Whereis.exe, 32-bit, Version 2.3
  10. Copyright (c) Code Blazers, Inc. 1989-1993. All rights reserved.
  11.  
  12. USAGE: whereis [starting-point]file-name [/q /s //drives]
  13.  
  14. if no drive letter in starting-point and //drives are not specified,
  15. all hard drives are searched
  16.  
  17.   starting point can be any valid filespec
  18.  
  19. /q       - quiet - suppress copyright
  20. /s       - suppress 'Searching' messages (good if redirecting to printer)
  21. //drives - specify each drive you want to search
  22.  
  23. EXAMPLES:
  24.   whereis e:foo.c      - search only drive E for foo.c
  25.   whereis foo.c //cde  - search drives C,D, and E for foo.c
  26.   whereis c:\os2\foo.c - search for foo.c using c:\os2 as the starting point
  27.   whereis foo.c        - search all hard drives for foo.c
  28.  
  29. WHILE RUNNING, THESE KEYS CAN BE USED:
  30.   D   - Toggles displaying of directories being searched
  31.   P   - Pauses the program
  32.   <ESC> - Exits the program
  33.  
  34. ALTERNATE FORM: whereis [/e /v /a] EnvVarName filename
  35.   /e     - Find first file in Env Variable
  36.   /v     - /e, but show directories searched
  37.   /a     - /e, but find all occurrences of file
  38.  
  39. EXAMPLES:
  40.   whereis -e PATH foo.exe  - search PATH env variable for first foo.exe
  41.  
  42. -------------------------------------------------------------------------------
  43.  
  44. Most of the time, if you always do a multiple-drive search, all you need to do
  45. is 'whereis filename'. The drives and directories will be displayed as they are
  46. searched.
  47.  
  48. To search only one drive, 'whereis d:filename' where d is the drive letter.
  49.  
  50. To search only specified drives, 'whereis filename //ddd' where each d is a
  51. different drive letter (that's right - 2 slashes). You can also use the '-' as
  52. a 'thru' symbol. For instance, //c-f means search drives c thru f. //cdj-i means
  53. search drives c, d, and j thru i. //d- means search all drives starting with d.
  54.  
  55. To search using a certain directory as a root for the search,
  56. 'whereis d:\dirpath\filename' where d is the drive letter and dirpath is any
  57. valid directory path. Leaving out the drive letter will search the current
  58. drive.
  59.  
  60. Using 'whereis .\filename' will start the search from the current drive and
  61. current directory using OS/2's special directory characters.
  62.  
  63. Hitting the D key while search is in progress will toggle the displaying of
  64. the directories being searched. This is useful for long searches because
  65. displaying the directory names does take time - a 37 second search took only
  66. 31 seconds without listing the directory names.
  67.  
  68. Use the /s option when redirecting to a printer. This will suppress all the
  69. messages that display program progress. Without the /s, your output will be a
  70. mess because the displays don't use line feeds.
  71.  
  72. An alternate form of whereis was suggested by Claude A. Felizardo and is
  73. implemented in this latest release. It combines some of my other little
  74. utilities into whereis.
  75.  
  76. Use the /e option to specify an environment variable to search for the file.
  77. For instance, to search the PATH for a file, do this:
  78.  
  79.  whereis /e PATH format.com
  80.  whereis /e INCLUDE pmwin.h
  81.  
  82. Wildcards are allowed in the filename.
  83.  
  84. The /v (verbose) switch will display the directories in the environment
  85. variable that whereis.exe searches.
  86.  
  87. The /e switch finds the first file that it finds that matches the filename and
  88. stops. The /a switch will force whereis to search all directories in the
  89. environment variable and display all files that it finds that match the
  90. filename. Since it searches the directories in the order of the directories in
  91. the environment variable, the first file will be the one found by most programs.
  92. For instance, 'whereis /a PATH link386.exe' will list all versions of
  93. link386.exe in your path but the first one will be the one invoked if you just
  94. type in 'link386' on your command-line.
  95.  
  96. Any comments, suggestions, bug reports can be sent to my CIS id 72251,750.
  97.  
  98. Rick Fishman
  99. Code Blazers, Inc.
  100. 4113 Apricot
  101. Irvine, CA 92720
  102.