Find the answer to your Linux question:
Results 1 to 6 of 6
Trying to find a directory named tmp and exclude any named .svn. Nothing I have tried works. Any suggestions?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3

    find directory exclude directories


    Trying to find a directory named tmp and exclude any named .svn. Nothing I have tried works. Any suggestions?

  2. #2
    Just Joined!
    Join Date
    Jul 2009
    Posts
    7
    Try this
    find -name tmp ! -name ".svn"

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    Quote Originally Posted by bills View Post
    Try this
    find -name tmp ! -name ".svn"
    That brings up directories with .svn in them. Basically my directories look like this:

    ./application/default/layouts/.svn/tmp
    ./application/default/models/.svn/tmp
    ./application/config/.svn/tmp

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    try this
    find -name tmp|grep -v .svn
    I m not sure if it will work but let me know if it doesn't
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  6. #5
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    Quote Originally Posted by vickey_20 View Post
    try this
    find -name tmp|grep -v .svn
    I m not sure if it will work but let me know if it doesn't
    That works! Thanks!

  7. #6
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    bingo!!
    that was just a wild guess
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

Posting Permissions

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