"find -name" ... case INsensitive?

Is it possible using the commandline “find” to find fils but without having to enter correct case?

Example:


bgrsvr-x:/home/badger_fruit/tmpshares # ls tv-series/
Dexter - Series 3        Simpsons, The - Series 20                           Ugly Betty - Series 3
Prison Break - Series 4  Terminator, the Sarah Connor Chronicles - Series 2


bgrsvr-x:/home/badger_fruit/tmpshares # find -name "*dexter*"

finds nothing, but


bgrsvr-x:/home/badger_fruit/tmpshares # find -name "*Dexter*"
./tv-series/Dexter - Series 3
./tv-series/Dexter - Series 3/Dexter.S03E08.HDTV.XviD-LOL.avi
./tv-series/Dexter - Series 3/Dexter.S03E03.HDTV.XviD-NoTV.avi
./tv-series/Dexter - Series 3/Dexter.S03E04.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E07.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E01.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E10.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E06.HDTV.XviD-LOL.avi
./tv-series/Dexter - Series 3/Dexter.S03E05.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E02.HDTV.XviD-0TV.avi
./tv-series/Dexter - Series 3/Dexter.S03E11.HDTV.XviD-aAF.avi
./tv-series/Dexter - Series 3/Dexter.S03E09.HDTV.XviD-0TV.avi
bgrsvr-x:/home/badger_fruit/tmpshares #

finds the files.

find -iname "*dexter*"

D’OH!
Such an easy thing!!
HAHA, I tried to read the man pages but there were PAGES and PAGES and PAGES!!!

Thank you!!!

actually you don’t have to read the man page, just hit “/” for search and “n” for next

also if you’re using different locales (i.e. not english) it could help to check the english manpage (though typically thereby you get even more PAGES and PAGES… :wink: )

LANG=C man foo

And **man:find **in Konqueror’s address bar makes a much more readible document (where searching for ‘case’ is also very easy).

On Wed, 17 Dec 2008 11:46:02 GMT, badger fruit
<badger_fruit@no-mx.forums.opensuse.org> wrote:

> bgrsvr-x:/home/badger_fruit/tmpshares # find -name “dexter

Use iname instead of name

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

And you could always just have find give you data and then use grep to
do the finding… which is what I did before learning about ‘iname’:

find ./ | grep -i fileNameHere

Good luck.

badger fruit wrote:
> Is it possible using the commandline “find” to find fils but without
> having to enter correct case?
>
> Example:
>
> Code:
> --------------------
>
> bgrsvr-x:/home/badger_fruit/tmpshares # ls tv-series/
> Dexter - Series 3 Simpsons, The - Series 20 Ugly Betty - Series 3
> Prison Break - Series 4 Terminator, the Sarah Connor Chronicles - Series 2
>
> --------------------
>
>
>
> Code:
> --------------------
>
> bgrsvr-x:/home/badger_fruit/tmpshares # find -name “dexter
>
> --------------------
>
>
> finds nothing, but
>
>
> Code:
> --------------------
>
> bgrsvr-x:/home/badger_fruit/tmpshares # find -name “Dexter
> ./tv-series/Dexter - Series 3
> ./tv-series/Dexter - Series 3/Dexter.S03E08.HDTV.XviD-LOL.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E03.HDTV.XviD-NoTV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E04.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E07.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E01.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E10.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E06.HDTV.XviD-LOL.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E05.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E02.HDTV.XviD-0TV.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E11.HDTV.XviD-aAF.avi
> ./tv-series/Dexter - Series 3/Dexter.S03E09.HDTV.XviD-0TV.avi
> bgrsvr-x:/home/badger_fruit/tmpshares #
>
> --------------------
>
>
> finds the files.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJSQkn3s42bA80+9kRArMzAJ9tQe8YBrPbF6J1yfqER/17UhJ0UQCfZdgX
vdCG4JWvkwS36/1kW57gZTs=
=kEMd
-----END PGP SIGNATURE-----