I have the following folder structure
| subdirectoy1 | | | |_ file1.jpg | |_ file2.jpg | |_ ... | | subdirectory2 | | | |_ file11.jpg | |_ file12.jpg | |_ ... | | ... | |_ file21.jpg |_ file22.jpg |_ ...
As you can see, there are some files at the root level of that folder and various subdirectories (more than the two in my tree here) with each of them containing more images.
My idea is now, that I want to find both the root level images and the images in subdirectory1, but not those in the other directories.
Well, I could go the easy way and just exclude the other directories one by one
find . -type f -not -path "*subdirectory2*" -exec ...
but I want this line to be more adaptable for cases when the other folders aren't named subdirectory2 and so on.
Or in other words: Is there a way to say
find . -maxdepth 1 ...
but with the exception of one specific subdirectory below that boundry?