Reputation: 3405
I am trying to find all .py files under specific path except only one specific init.py file. Please note that I dont want to exclude other init.py files.
I tried find risk/bouncer/test/tt/ -name "*.py" ! -name __init__.py
but it ignores all init.py files.
I want to ignore only __init__.py
file from risk/bouncer/test/tt/
and all other files should be there.
Upvotes: 0
Views: 224
Reputation: 785146
You can use -path
option for this requirement:
find risk/bouncer/test/tt/ -name "*.py" -not -path risk/bouncer/test/tt/__init__.py
Upvotes: 1