remove all files of a certain type linux code example
Example 1: rm files with extension
find . -name "*.bak" -type f -delete
Example 2: ubuntu delete all files with extension
cd <dir>
find . -type f -iname \*.jpg -delete
find . -name "*.bak" -type f -delete
cd <dir>
find . -type f -iname \*.jpg -delete