I want to search for every file with the name myslq so I can delete it.
I first used this command:
This finds me about 880 entries.
This includes everything in my School folder, that I don't want to find. So I added to the regex, that it won't find the files in this folder
For that I used this command:
Which should at least have about 5 entries or so.
When I run the command with the slightly increased regex, I get a Permission denied.
So I tried running it with the root user which also doesn't work. But with the first command it shows me everything:
As far as I know, the root user should be able to do anything. At least it should be able to run a find command...
Update:
Thanks to @Wiktor Stribiżew I figured out, I just used the find command wrong.
The working command would be: find . ! -path '*/School/*' -name '*mysql*'