|
|
1.1 ! root 1: .\" Copyright (c) 1980 The Regents of the University of California. ! 2: .\" All rights reserved. ! 3: .\" ! 4: .\" Redistribution and use in source and binary forms are permitted ! 5: .\" provided that the above copyright notice and this paragraph are ! 6: .\" duplicated in all such forms and that any documentation, ! 7: .\" advertising materials, and other materials related to such ! 8: .\" distribution and use acknowledge that the software was developed ! 9: .\" by the University of California, Berkeley. The name of the ! 10: .\" University may not be used to endorse or promote products derived ! 11: .\" from this software without specific prior written permission. ! 12: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 13: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 14: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 15: .\" ! 16: .\" @(#)whereis.1 6.3 (Berkeley) 3/10/90 ! 17: .\" ! 18: .TH WHEREIS 1 "March 10, 1990" ! 19: .UC ! 20: .SH NAME ! 21: whereis \- locate source, binary, and or manual for program ! 22: .SH SYNOPSIS ! 23: .B whereis ! 24: [ ! 25: .B \-sbm ! 26: ] [ ! 27: .B \-u ! 28: ] [ ! 29: .B \-SBM ! 30: dir ... ! 31: .B \-f ! 32: ] name ... ! 33: .SH DESCRIPTION ! 34: .I Whereis ! 35: locates source/binary and manuals sections for specified files. ! 36: The supplied names are first stripped of leading pathname components ! 37: and any (single) trailing extension of the form ``.ext'', e.g. ``.c''. ! 38: Prefixes of ``s.'' resulting from use of source code control are also ! 39: dealt with. ! 40: .I Whereis ! 41: then attempts to locate the desired program in a list of standard places. ! 42: If any of the ! 43: .B \-b, ! 44: .B \-s ! 45: or ! 46: .B \-m ! 47: flags are given then ! 48: .I whereis ! 49: searches only for binaries, sources or manual sections respectively ! 50: (or any two thereof). ! 51: The ! 52: .B \-u ! 53: flag may be used to search for unusual entries. ! 54: A file is said to be unusual if it does not have one entry of ! 55: each requested type. ! 56: Thus ``whereis -m -u *'' asks for those files in the current ! 57: directory which have no documentation. ! 58: .sp ! 59: Finally, the ! 60: .B \-B ! 61: .B \-M ! 62: and ! 63: .B \-S ! 64: flags may be used to change or otherwise limit the places where ! 65: .I whereis ! 66: searches. ! 67: The ! 68: .B \-f ! 69: file flags is used to terminate the last such directory list ! 70: and signal the start of file names. ! 71: .SH EXAMPLE ! 72: The following finds all the files in /usr/bin which are not documented ! 73: in /usr/man/man1 with source in /usr/src/cmd: ! 74: .IP ! 75: cd /usr/ucb ! 76: .br ! 77: whereis \-u \-M /usr/man/man1 \-S /usr/src/cmd \-f * ! 78: .SH FILES ! 79: /usr/src/* ! 80: .br ! 81: /usr/{doc,man}/* ! 82: .br ! 83: /lib, /etc, /usr/{lib,bin,ucb,old,new,local} ! 84: .SH BUGS ! 85: Since the program uses ! 86: .IR chdir (2) ! 87: to run faster, pathnames given with the ! 88: .B \-M ! 89: .B \-S ! 90: and ! 91: .B \-B ! 92: must be full; i.e. they must begin with a ``/''.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.