0
Consider this directory:
thingsToThinkAbout/
thing1.txt
thing2.txt
thing2.txt.thoughts.txt
thing3.txt
thing7.txt.thoughts.txt
With bash find
I can look for the things (find . -name "thing*.txt"
), the thoughts (find . -name "thing*.txt.thoughts.txt"
) or both (find . -name "*.txt"
), but can I use the command to search based on siblings as well?
In my example, I did not think about thing1.txt
and thing3.txt
, and I have some thoughts about a "thing 7", which doesn't exist. To find those, I would have to look for files X who do not have siblings named Y. How could this be done?
Obviously, I could write a complete script with if
s, but is that needed?