terminal remove files from subfolders by type code example Example: rm files with extension find . -name "*.bak" -type f -delete