grep all files in directory with extension format output code example Example: grep only in php files grep -r -i --include=\*.php 'searchterm' ./