Originally Posted by thomas2004ch
if there more than hundreds of files?
What acid_kewpie wanted to make you notice is that you did not provide many details about your requirement. In a real case
you have to establish some criteria to select only a partial list of the files, using regular expressions and/or globbing. You can test your "selection" using ls
and after you've carefully checked the result, you can do the same using the rm
If something goes wrong you can always restore the accidentally deleted files from your backup (do you have a backup, don't you?).
If you need to select files, based on numbering you can either use a character list as in the example by Tinkster, a numeric interval, shell's brace expansion or command substitution with seq