3 Ways to Delete All Files in a Directory Except One or Few Files with Extensions
The different extended pattern matching operators are listed below, where pattern-list is a list containing one or more filenames, separated using the | character: *(pattern-list) – matches zero or more…