Search code examples
bashrm

Remove all files that start with same prefix, but different filetype


How do I remove all files in a folder that start with the same prefix? For example:

I have files:

SVM1.txt
SVM2.csv
SVM3.mat
helloworld.txt
README.txt

I want to delete all the files that start with 'SVM'. Note that they start with the same prefix, but are of different filetype!


Solution

  • With wildcards, of course.

    rm SVM*