У меня следующая похожая структура.
$ tree ./tmp
./tmp
├── file.ext
├── file.other_ext
└── inner_tmp
├── inner_file.ext
└── inner_file.other_ext
1 directory, 4 files
$
Когда я пытаюсь
$ find ./tmp -type f -name '*.ext' -not -path './inner_tmp/'
ИЛИ
$ find ./tmp -path './inner_tmp/*' -prune -o -type f -name '*.ext' -print
Я получаю следующее:
./tmp/inner_tmp/inner_file.ext
./tmp/file.ext
Вопрос: почему каталог inner_tmp
включен в результат? Что мне здесь не хватает?