find . -type f -wholename '*/DIRECTORY/*' -exec rm -rf {} \;
Where DIRECTORY is the name of your directory.
For example, you will be able to find all theses files
/home/toto/test/DIRECTORY/toto.txt
/home/toto/test1/DIRECTORY/tata.txt
/home/toto/test2/DIRECTORY/titi.txt
You must execute the command from /home/toto
No comments:
Post a Comment