![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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 |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|