exclude directories from find

To exclude dirs from the find command:

find / -path ‘/some/dir’ -prune -o -name ‘*.txt’ -ls

Technorati Tags: , , ,

~ by princ3 on January 28, 2007.

9 Responses to “exclude directories from find”

  1. nice one, ty :-)

    //Jadu, unstableme.blogspot.com

  2. Not a good trick, instead one should use
    find . -type f

  3. You misunderstood, i didnt ment not to find directories, but not to search IN specific directories.

  4. The style of writing is very familiar . Have you written guest posts for other bloggers?

  5. осилил сколько ни говори халва во рту сладко не станет Ж)

  6. come by virginia slims ultra sunlight cigarettes
    second-rate doral cigarette tawdry doral cigarette|cheap doral cigarettes
    cut-price doral cigarettes tuppenny doral cigarettes
    cheap gpc cigarette reduced gpc cigarettes
    tuppenny gpc cigarettes shoddy gpc cigarettes
    discount doral cigarettes

  7. Altogether meticulous paper! Influential jon admins! I identify its petrified but you are on the claim style! Like you cobweb! Thanks

  8. A friend just did this as part of a conversation about this:

    find /topdir !-wholename “dirtoexclude”

Leave a Reply