Search All Files Recursively for a String

find / -xdev -type f -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.


There are no comments for this item.