Is it possible to search within a directory to scan all files for a particular string, then return the file(s) if the string is found?
For example I am looking to try find files where "120854" is found. If we take the below example using a directory called /users/TCP/ that contains two files called File1 and File2.
File1
-----
Product1:432153
Product2:8614
Product3:975
File2
-----
Product76:87
Product324:684
Product965:120854
The expected outcome would return /users/TCP/File2 as "120854" is found on line 3 in that file. Obviously the directory I'm using has thousands of files and therefore wondering if this is possible. Can't find anything online myself
Thanks!