whereis ls

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers whereis ls
# 1  
Old 11-09-2001
whereis ls

When I execute the following:


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


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

# 2  
Old 11-09-2001
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
Does this work with you?? Because the /bin seems to be appearing in the PATH


isgsi01(root)7: echo $PATH

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


but still does not show up using 'whereis'
# 4  
Old 11-11-2001
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Help with find/whereis C Shell Script

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Write a C Shell Script called "hunt" that takes a filename as it's single parameter and displays the full pathname of every file name that matches,... (1 Reply)
Discussion started by: new2C
1 Replies

2. UNIX for Dummies Questions & Answers

difference of find,locate and whereis

hi guys, may i know the difference of find,locate and whereis ? (3 Replies)
Discussion started by: cromohawk
3 Replies
Login or Register to Ask a Question