I have this string : MY_STRING
and I have this directory :
|root
|-MY_STRING // <- directorio con MY_STRING por nombre
|--MY_FILE.txt // <- archivo con MY_STRING escrito en el
|home
|-MY_STRING.txt // <- archivo con MY_STRING por nombre
I would like to be able to search MY_STRING
with a command and return something like:
/root/MY_STRING
/root/MY_STRING/MY_FILE.txt
/home/MY_STRING.txt
At the moment I have tried with commands more or less like this:
grep -ril "MY_STRING" /
grep -rnw '/'-e "MY_STRING"
But these only return the path of the file:
/root/MY_STRING/MY_FILE.txt