The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 11-09-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
whereis ls

When I execute the following:

<pre>

$ whereis ls
ls: /usr/bin/ls /usr/ucb/ls
$ pwd
/bin
$ ls -la ls
-r-xr-xr-x 1 bin bin 18120 Oct 6 1998 ls

</pre>

....but as you can see the 'ls' command is in the /bin directory AS WELL. Why doesn't show up on 'whereis'???

Thanks
Forum Sponsor
  #2  
Old 11-09-2001
Registered User
 

Join Date: Oct 2001
Posts: 7
I think that /bin would need to be in your PATH for the whereis to find it. If you add /bin to your PATH->

export PATH=$PATH:/bin:

and try your whereis again, maybe it will be found.
  #3  
Old 11-09-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
Does this work with you?? Because the /bin seems to be appearing in the PATH

<pre>

isgsi01(root)7: echo $PATH
/usr/openwin/bin:/usr/openwin/bin/xview:/usr/bin/X11:/usr/bin:/usr/ucb:<B>/bin<B>:/usr/sbin:/etc:/usr/etc:/usr/sccs:/usr/ccs/bin:/usr/opt/SUNWmd/sbin:/opt/SUNWhsm/sbin:/jumpstart/admin/bin:.

isgsi01(root)9: whereis ls
ls: /usr/bin/ls /usr/ucb/ls
isgsi01(root)10:


</pre>

but still does not show up using 'whereis'
  #4  
Old 11-11-2001
Registered User
 

Join Date: Nov 2001
Posts: 60
The whereis command does not use the PATH env var for the search path. It uses a pre-defined search path, see the man page for whereis. Try the which command to search along your PATH.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0