Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From GNU less manpage

-i or --ignore-case

Causes searches to ignore case; that is, uppercase and lowercase are considered identical.

This option is ignored if any uppercase letters appear in the search pattern; in other words, if a pattern contains uppercase letters, then that search does not ignore case.


Like -i, but searches ignore case even if the pattern contains uppercase letters.

This is a great way of searching in GNU less, while ignoring case sensitivity. However, you must know in advance that you'd like to search while ignoring case sensitivity and indicate it in the command line.

vim solves this problem by letting the user specify \c before a search, to indicate that the pattern should be searched while ignoring case sensitivity.

Is there a way to do the same in less (without specifying -I in the command line)?

share|improve this question
You can set the LESS environment variable to "-I" and each time you run less it will get the -I option – Vitaly Polonetsky May 24 '09 at 9:12
up vote 30 down vote accepted

You can set it from within less by typing -i and then doing the normal search procedure.
Have a look in the help for less by pressing h

share|improve this answer
Thanks :) I was looking only at the man page, and forgot to look at the inline help. This is exactly what I was looking for. – Tom Feiner May 24 '09 at 11:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.