=^.^=

Search All Files Recursively for a String

karma

To recursively search all files under /path for a given string run:

find / -xdev f -type -print0 | xargs -0 grep -H "string"

The -xdev argument ignores other filesystems mounted under the given path, avoiding /proc and /dev for example. If, for example, your /home folder is on a different partition, it won't be searched. Run the command again on that specific path.

Some other common filesystem search patterns are covered in:

Comments

There are no comments for this item.