Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I wonder how to use the command locate to search for words that are not case sensitive? Such as modify locate normal to search for results that have "Normal" and "normal".

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

That depends on the locate you use. There are a couple of implementations, with identical executable names, but various package names: locate, slocate, mlocate, rlocate.

Usually they all have -i and/or --ignore-case switch. Consult your locate's man page for the exact syntax.

Also usually they have no configuration file, so if you want to set the case-insensitiveness persistently, set an alias in your .bashrc (or similar) file: alias locate='locate -i'.

share|improve this answer
add comment

Your Answer

 
discard

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.