Use this to recursively delete all files with a specific extension (file type) in the current directory and sub-directories.
$ find . -name "*.ext" -type f -delete
Use this command to do a dry run by listing all the files.
$ find . -name "*.ext" -type f
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.