I have a rather complex set of files to be found and reacted upon (e.g. paths copied to a text file):
For example:
find / \( -iname "*ssh*" -or -iname "*scp*" \) \( -not -path -"/run" -not -path "/rw/*" -and -not -path "/home/*" -and -not -path "*/qml/*" \) >> ~/files.txt
Here I want to find all files or folders that are related to "ssh" and "scp" but not in /run or in /rw directories.
I will be adding more conditions to this, but the commands gets so long. How can I do this with regex?