classes.conf - Linux


classes.conf is a text file used in Linux to define character classes for file name expansion. It allows for fine-grained customization of pattern matching rules when using wildcards such as * and ?.






Defining a New Character Class

Add the following line to classes.conf:

myclass = abc0123_-

This creates a new character class named myclass that matches any character in the string abc0123_-.

Using a Character Class in File Name Expansion

To expand all files ending with the defined character class:

ls *.myclass

Common Issues

File not Found

Ensure the classes.conf file exists in /etc. If it doesn’t, create a new file with write permissions.


classes.conf interacts with the bash shell. Character classes defined in classes.conf are used for file name expansion in shell scripts and commands.

Related Commands

  • wildcards: Expands files based on wildcard patterns
  • file: Provides detailed information about files