To solve this problem, you can take advantage of Linux's built-in wildcard
support. This support, also called "globbing" (for historical reasons), allows
you to specify multiple files at once by using a wildcard pattern. Bash
and other Linux commands will interpret this pattern by looking on disk and
finding any files that match it. So, if you had files file1
through file8 in the current working directory, you could remove
these files by typing:
$ rm file[1-8]
Or if you simply wanted to remove all files whose names begin with
file, you could type:
$ rm file*