Author : Piyush Gupta
How to Find all Files Containing a String in Linux. This tutorial will help you to search all files containing specific text string recursively. This tutorial uses “find” command to search string in files. Alternatively, You can also use grep command to search text.
Command:
Uses:
Below is an example command which searches text ‘redhat’ in / filesystem. This command will search for all files containing string ‘redhat’ and list file names only like below.
To Search in specific file extension files. Like search ‘redhat’ in all php files only, use following command.
No comments:
Post a Comment