
Ask HN: Setting to ignore /node_modules with find and grep - ereckers
Searching files in terminal and node_modules is making my life extremely uncomfortable.<p>Project directory looks like so:<p><pre><code>   project&#x2F;
   ├── index.html
   ├── node_modules
   ├── js&#x2F;
   │   └── scripts.js
   └── style.css
</code></pre>
I find myself using `find . | xargs grep &quot;text string&quot;` to search the project directory.<p>I want to ignore everything in node_modules all of the time.<p>I&#x27;m familiar with --prune and ignoring, etc.. but I want something like an alias in my .profile that ALWAYS ignores the contents of node_modules.<p>I&#x27;ve looked around, but I just don&#x27;t know if I&#x27;m asking the question correctly.<p>Anyone have any solutions?
======
kspaans
Tried `git grep`? It's a nearly full grep, and will ignore things that aren't
tracked in the repo.

