linux remove all files with extension in subdirectories code example
Example 1: rm files with extension
find . -name "*.bak" -type f -delete
Example 2: bash delete all files of type recursively
# print all files recursively with exstension .bak
find . -name "*.bak" -type f
# add -delete command at the end to delete them
find . -name "*.bak" -type f -delete
Example 3: linux remove all files same extension in directory
find . -type f -iname \*.zip -delete