View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > Wildcard

From LQWiki

Jump to: navigation, search

Wildcards are aids to searching. They are mostly used in finding files but also used in scripts and most programming languages for searching arrays and strings.

The most common wildcard is the '*' which means any number of symbols. Next most common is the '?' wildcard, which denotes a single occurence of any symbol. In some instances a '.' (period or fullstop) will act as a wildcard. There are others, that work on specific occasions, to denote NOT a character, or not a digit, or not a punctuation symbol.

For example, typing *.conf will return a list of all files in a directory (and/or depending on your search settings, subdirectories).

So searching this document for wild* would return all occurencies of 'wildcard' and 'wildcards', while searching for w?l?* would also return the instances of 'will'.


Personal tools