It's explained in the man page for
The default action for REs is to ignore case if there are no uppercase characters present, but to act case-sensitively otherwise.
There are three modes available within
- Case context dependent: a search or RE without uppercase characters is considered to be case-insensitive, but a search or RE containing at least one uppercase character is considered to be case-sensitive. Examples:
abc will match
aBc will only match
aBc and not
ABC. This is the default setting.
- Case sensitive: a search or RE pays full regard to the case of any letter. Example:
abC will match only
abC and not
- Case insensitive: a search or RE pays no regard to the case of any letter. Example:
abC will match any of
You can toggle case sensitive comparisons with
-I, and case context sensitive comparisons with
The control can be specified in three ways:
- On the command line, for example
less -I bigfile.txt.
- In the environment, for example
export LESS=-i and later
less itself, for example by starting
less bigfile.txt and then typing