How can I find a file by its content on Linux in the command line?
For example, I want to find a file containing the word "helo" on my computer.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityYou can create a file named grepall in /usr/local/bin/ with following content:
find -type f -exec grep -q $1 {} \; -print
then you can search for content by use grepall something