Mohammadreza Hadizadeh

How to delete all files of a specific extension in a directory and all subfolders using a command-line?

To remove all files with a specific extension (e.g. .data) in the current directory and all subfolders run
find . -name "*.data" -type f -delete
But first use "find" to see exactly which files you will remove:
find . -name "*.data" -type f