6
I’m generally use a Debian based Linux distribution of some sort; either Debian 7.8 or Linux Mint 17. I have a split RAR file like this:
filename.rar
filename.r01
filename.r02
filename.r03
etc ...
Having extracted the archive using dtrx
or unrar
, I’d like to delete all the part files of the split archive using, preferably a single line.
At the moment I do rm filename.r*
, which in general works well, however if the files are name like rabbid.ranger.robot.r01
it can delete the extracted directory rabbid.ranger.robot
as well.
So I’m looking for something a bit more robust.
Will accept a short script as well.
1Two very good answers, hard to choose between them. I'll certainly be using this feature of bash as well. I felt Devan's answer had the edge, although not to belittle this answer. – fswings – 2015-04-06T20:15:38.680