The main problem is my directory has many files with uppercase (e.g. Foobar.txt, FooBar.txt, even FOOBAR.txt). And I find it messy to find the files by exactly typing it (if I know the exact filenames, why would I use find?). So I want to type just foobar and want all three files in resultAlso, I am using * both of the side of my string to match any number of characters preceding and appending in the file name.I want an alias or function that does this.
how to search case insensitively (with '*' wildcard) with 'find'?
find
The correct way then would befind -iname \*foobar\*Where -iname is for case insensitive search, and the \ to escape the * wildcard.The function seems a bit unnecessary for this case, but it is easy to writefunction lazyfind (){    find -iname \*$1\*}