Programming/Linux Tip

find and grep on linux shell

decdream 2019. 1. 2. 20:14

Sometimes, we want to perform 'grep' command among results of 'find' command.

I'll introduce how can we do this easier.


The way is very simple - magic keyword is "--include=<file name>"



Example, below command find "PAGE" word among the files what has ".dts" string in file name.


grep -snra --include="*.dts*" "PAGE"