Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

Using Wildcards

Sometimes you need to look at or use multiple files at the same time. For instance, you might want to delete all .rar files or move all .odt files to another directory. Thankfully, you can use a series of wildcards to accomplish such tasks.

  • * matches any number of characters. For example, *.rar matches any file with the ending .rar.
  • ? matches any single character. For example, ?.rar matches a.rar but not ab.rar.
  • [characters] matches any of the characters within the brackets. For example, [ab].rar matches a.rar and b.rar but not c.rar.
  • *[!characters] matches any characters that are not listed. For example, *[!ab].rar matches c.rar but not a.rar or b.rar.
  • + Share This
  • 🔖 Save To Your Account