Path: utzoo!utgpu!attcan!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!ast From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: Hereis whereis [was: whereis whereis] Message-ID: <1861@ast.cs.vu.nl> Date: 5 Jan 89 19:48:06 GMT References: <6216@louie.udel.EDU> Reply-To: ast@cs.vu.nl (Andy Tanenbaum) Organization: VU Informatica, Amsterdam Lines: 32 In article <6216@louie.udel.EDU> jnall%FSU.BITNET@cunyvm.cuny.edu (John Nall 904-644-5241) writes: >The man_guide for 1.3d indicates that the whereis command exists. However, >my source for 1.3d (which came from the D1.2-1.3 file from bugs.nosc.mil) >does not include it. Hereis whereis. It is in /usr/bin only (not in commands). Andy Tanenbaum ----------------------------------- whereis -------------------------------- : List all system directories containing the argument : Author: Terrence W. Holm if test $# -ne 1; then echo "Usage: whereis name" exit 1 fi path="/bin /lib /etc\ /usr/bin /usr/lib\ /usr/include /usr/include/sys" for dir in $path; do for file in $dir/$1 $dir/$1.*; do if test -f $file; then echo $file elif test -d $file; then echo $file/ fi done done exit 0