Problem: Find a word inside a file or directory
Solution: grep command can be used to find a word inside a file.
Solution: grep command can be used to find a word inside a file.
[root@iravath search]# grep -rnw '.' -e "Apple" ./names.txt:3:AppleThe above command search for word "Apple" inside a file. The word "Apple" was found in names.txt at line number 3.