A
A
Alexander2015-03-06 12:27:23
linux
Alexander, 2015-03-06 12:27:23

How to search by find skipping some directories?

Subject.
Let's say I'm looking for: find ./ -name '*.php' | xargs grep -E '[0-9a-zA-Z/]{80}'
How can I skip the cache and crm/m_cache directories that are in the current one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Shetani, 2015-03-06
Madzhugin @Suntechnic

find . -name "*.php" ! -path "./cache/*" ! -path "./crm/m_cache/*"

A
Armenian Radio, 2015-03-06
@gbg

Add an exclamation point before the condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question