What is the symbol *.* called?

Interpretation of *.* under old Windows/DOS systems

The significance here is more related to Windows/DOS than to Unix/Linux. On old Windows/DOS sytstems it was a 'wildcard' pattern. Wildcard patterns were used for matching filenames in a similar manner to Unix globs. The *.* wildcard was commonly used to match any file.

As with a Unix glob, the * will match any sequence of characters in a filename, as such * on its own will also match any file. However the reason why *.* will match any filename too is due to differences in the way that these wildcards work. According to this article:

Any characters other than a dot that come after an asterisk have no effect, since the asterisk moves the cursor to position 12, at which point nothing changes the parse state except for a dot, which clears the last three positions and moves the cursor.

This behaviour (somewhat odd from Unix perspective) means that a dot following a * does not actually match a dot, but is just a hackish way to allow you to add more characters to the pattern. This means that adding another * will match anything in these last three positions.

This makes a little more sense when you consider that the syntax was used on DOS and old Windows systems before Windows 95 which required 8.3 filenames. These filenames were only allowed to have one dot and at most three characters following the dot. Most, if not all files on the system would have a three character extension (even though technically a shorter or no extension was allowed), so somehow I guess it made sense to use *.* to match any file (at least from a warped Windowsey logic perspective).

Interpretation of *.* in Unix shells

In Unix shells, as others have pointed out, this represents a 'pathname expansion' or 'glob.' The * does not have any odd jumping to the end behaviour and thus does not lead to characters following it being ignored. *.* pattern will match any filename containing a dot (except at the start). This will definitely not match any file as there are many files on a Unix/Linux system that don't have an extension (or otherwise contain a dot since this is allowed too).

The reason for *.* not matching a dot at the start of filenames on Unix is because putting a dot at the start is how files are 'hidden' and hidden files are excluded from globs by default. To match them in a POSIX shell, a dot needs to be put explicitly at the start of the pattern. In bash the dotglob shell option can be set or the GLOBIGNORE variable can be set appropriately, but this is another question!


It's glob in bash. Below I have quoted from the bash manual:

bash - GNU Bourne-Again SHell

*

Matches any string, including the null string. When the globstar shell option is enabled, and * is used in a pathname expansion context, two adjacent *s used as a single pattern will match all files and zero or more directories and subdirectories. If followed by a /, two adjacent *s will match only directories and subdirectories.

In this case, *.* match any files that contain a dot . in its name.

You can see more details here.


The asterisk * is a glob in shell language. Quoting from Shell Command Language:

The asterisk ( '*' ) is a pattern that shall match any string, including the null string.

However, it doesn't match filenames beginning with a . unless the shell option dotglob is set.

When you use *.*, it matches anything that:

  • does not start with a .
  • contains at least one .

You might also want to refer to Filename Expansion in the manual.