I prefer to seach with locate command but I don’t know how to perform a partial search with it.
Suppose I want to search file containing the word libevent. How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Locate searches for file names. Not file contents.
The ugly way is to use grep It’ll start searching from
/directory.The better way is to narrow down the suspected directories where this files could exists. Suppose those directories’ full paths are
/path/to/dir1,/path/to/dir2etc. Then invoke the following command.