Results 1 to 7 of 7

Thread: "find -name" ... case INsensitive?

  1. #1
    badger fruit NNTP User

    Default "find -name" ... case INsensitive?


    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.


    --
    badger_fruit
    ------------------------------------------------------------------------
    badger_fruit's Profile: http://forums.opensuse.org/member.php?userid=2099
    View this thread: http://forums.opensuse.org/showthread.php?t=401894


  2. #2
    zandro NNTP User

    Default Re: "find -name" ... case INsensitive?


    badger_fruit;1909296 Wrote:
    > Is it possible using the commandline "find" to find fils but without
    > having to enter correct case?
    >
    > >

    Code:
    --------------------
    > >

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

    --------------------
    > >

    >
    > finds nothing



    Code:
    --------------------
    find -iname "*dexter*"
    --------------------


    --
    zandro
    ------------------------------------------------------------------------
    zandro's Profile: http://forums.opensuse.org/member.php?userid=16882
    View this thread: http://forums.opensuse.org/showthread.php?t=401894


  3. #3
    badger fruit NNTP User

    Default Re: "find -name" ... case INsensitive?


    zandro;1909303 Wrote:
    > >

    Code:
    --------------------
    > > 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!!!!


    --
    badger_fruit
    ------------------------------------------------------------------------
    badger_fruit's Profile: http://forums.opensuse.org/member.php?userid=2099
    View this thread: http://forums.opensuse.org/showthread.php?t=401894


  4. #4
    zandro NNTP User

    Default Re: "find -name" ... case INsensitive?


    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... )


    Code:
    --------------------
    LANG=C man foo
    --------------------


    --
    zandro
    ------------------------------------------------------------------------
    zandro's Profile: http://forums.opensuse.org/member.php?userid=16882
    View this thread: http://forums.opensuse.org/showthread.php?t=401894


  5. #5
    Vince NNTP User

    Default Re: "find -name" ... case INsensitive?

    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


  6. #6
    hcvv NNTP User

    Default Re: "find -name" ... case INsensitive?


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


    --
    Henk van Velden
    ------------------------------------------------------------------------
    hcvv's Profile: http://forums.opensuse.org/member.php?userid=180
    View this thread: http://forums.opensuse.org/showthread.php?t=401894


  7. #7
    ab@novell.com NNTP User

    Default Re: "find -name" ... case INsensitive?

    -----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-----

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •