when searching filename or dirname case-insensetively, we can use option -iname.

but if I want to ignore case in -path option, what should I do?

can I do it with only find command, without using grep?

  • 3
    May be a silly question - but did you check whether your system's find provides a -ipath test? – steeldriver May 25 at 2:13
  • 1
    even if it doesn't support, you can do find -path './[Pp][Aa][Tt][Hh]' – αғsнιη May 25 at 4:16
  • @steeldriver actually it has this -ipath option. I am using BSD find on mac. thanks for your help! – Teddy C May 25 at 4:39

If you're using GNU find then there's the -ipath option

If locate is available on your system you can also use locate -i

See also

  • BSD find also has -ipath option. thanks! – Teddy C May 25 at 4:41
  • sfind has also an -ipath option. – schily May 27 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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