I have a directory with some files, especially .tex
files and those created by pdflatex
. I want to be able to give a name name
and remove all the files called name
except name.tex
I tried
rm name.* !(name.tex)
but it has removed every file in the directory (even those called name2) I suppose I can create a function or something but if I don't have to...
rm
andrm -i
? – Ccile Jun 26 '17 at 20:28