I would like to know if there's any tool in bash that can exclude from find searching directories that match certain regex patterns
There's an example:
- ./dokuments
- ./dokuments/1.txt
- ./dokuments/files/2.txt
- ./documentsz/message.doc
When i run my script (that basicly explores the directories and creates a report on its contents) with this regex "ents$" for example - the result should be only message.doc which is in ./documentsz and not those other files.
I've seen many solution as find . -not -name, -regextype posix-egrep -regex, but it does not work for me, because i don't know the regex in advance, i don't know what name of directory(that match regex) will be used.