Bash - Search Directory Recursively for Term using grep

: ' grep -Rn <needle> <haystack> ' # Find all lines containing "world" in any file and folder under /lib grep -Rn "world" /lib # Search for $foo['bar'] in directory. Notice the escaped characters. grep -Rn "\$foo\['bar'\]" /lib

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.