Command line tip - search a directory for files containing a particular pattern, printing filenames only - "grep -rl PATH_MAX /usr/include"

Jun 5, 2015 · 1:25 PM UTC

1
6
Replying to @hal_pomeranz
@hal_pomeranz I distinctly remember you asking me that question during an interview 20 years ago. Before the -r and -l options, I think...
1
. @dudleypippin Yep. Old school is "find /usr/include -type f | xargs grep -l PATH_MAX"
1
1