Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 10680  / 2 Years ago, wed, january 12, 2022, 6:12:36

I was looking for a specific file using whereis from the command line.



I got a rather useless result, but I then found the exact file I was looking for by manually searching.



I did not make a mistake in the command line. Why didn't whereis turn up all my files? Is there another method?


More From » 12.04

 Answers
4

whereis doesn't locate files, because whereis command is not intended to be used for that.



From whereis manpage



whereis - locate the binary, source, and manual page files for a command




whereis locates source/binary and manuals sections for specified
files. The supplied names are first stripped of leading pathname
components and any (single) trailing extension of the form .ext, for
example, .c. Prefixes of s. resulting from use of source code control
are also dealt with. whereis then attempts to locate the desired
program in a list of standard Linux places.




For more information type man whereis in your terminal to refer the man page. For finding a file you have to use commands like grep, find, locate, etc...


[#33485] Friday, January 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
enytidge

Total Points: 169
Total Questions: 105
Total Answers: 107

Location: Papua New Guinea
Member since Tue, Aug 24, 2021
3 Years ago
enytidge questions
Tue, Feb 28, 23, 15:26, 1 Year ago
Sun, Jan 1, 23, 19:36, 1 Year ago
Sun, Oct 24, 21, 07:30, 3 Years ago
Wed, Nov 9, 22, 22:02, 2 Years ago
;