Which whereis type
Active Oldest Votes. How about learning about whereis and which using whatis? Improve this answer. There's more to it than that. On my system, whereis and which return different executable paths. I can only get the path to the one that actually runs with whereis , not the one for which. JordanReiter: It can't be!
Are you sure the path pointed by which isn't just a symlink to the path pointed by whereis? Maybe it is a shell alias. Show 4 more comments. Amber Amber 4 4 silver badges 4 4 bronze badges. Unix, Linux etc. Mac OS X belonging in the etc. Ohhh, haha, I always thought that stack overflow was censoring the U in unix whenever I saw that for some reason..
Just a fairly common convention of creative wildcard use to refer to a family of similar operating systems. The whereis command still locates the executable, even if your PATH is empty. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. Often I also pipe to less as the list can be long. Typically I do:. How Unity's dash works is explained here - it uses Zeitgeist to index system files and learn from usage patterns, and enables other applications to make use of this data, so it is doing a lot more work than locate.
Also finds files by filename but does not search the directory structure itself but only a database prepared by updatedb. Because of that locate is faster than find but less accurate. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 5 years, 4 months ago. Active 4 years, 11 months ago.
Viewed 6k times. Improve this question. Chinmaya B Chinmaya B 4, 5 5 gold badges 20 20 silver badges 42 42 bronze badges. Sorry I was just attempting to add onto your question. I am unable to find any manual or info page for the type command.
I tried man type and info type. Hmm I wonder why If you want to search specifically for, say binary, then you can use the -b command line option. For example:. Similarly, the -m and -s options are used in case you want to find manuals and sources. By default whereis tries to find files from hard-coded paths, which are defined with glob patterns. However, if you want, you can limit the search using specific command line options. Note : Since you can pass multiple paths this way, the -f command line option terminates the directory list and signals the start of file names.
Similarly, if you want to limit manual or source searches, you can use the -M and -S command line options. For whereis, a command becomes unusual if it does not have just one entry of each explicitly requested type. For example, commands with no documentation available, or those with documentation in multiple places are considered unusual. The -u command line option, when used, makes whereis show the command names that have unusual entries. For example, the following command should display files in the current directory which have no documentation file, or more than one.
Agreed, whereis is not the kind of command line tool that you'll require very frequently. But when the situation arises, it definitely makes your life easy.
0コメント