Recently in the Tutor write network bandwidth allocation simulation program, during the generation of a large number of temporary files, how to use RM instructions to delete these temporary files without deleting other specific files?
For example, the following is a temporary file:
temp101 temp102 temp103 temp104 temp105
temp201 temp202 temp203 temp204 temp205
temp301 temp302 temp303 temp304 temp305
temp401 temp402 temp403 temp404 temp405
temp501 temp502 temp503 temp504 temp505
There are also files in the same directory that you want to keep:
Temp10
Temp20
Temp30
Temp40
Temp50
This requires the use of the RM instruction and the character set in the regular expression
RM-RF Temp[1-5]0[1-5]
In regular expressions you can use character groups to match some characters, [] character groups represent one character
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
New for Linux RM delete instructions