Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just downloaded some source code from a repository and I'm trying to locate a specific file in it. For simplicity, assume that the entire project has the following directory hierarchy

        project
       /       \ 
    src          docs
   /    \             \
other    test2.h        test1.h

I navigate to the project directory and then use the following command

sudo find . -name test1.h

This works perfectly.

However, the following command doesn't work:

sudo find . -name test2.h

The find command is able to locate test1.h but not test2.h. Why could this be? Is it possible for one of the folders to be non-searchable?

Note, I'm doing all of this on a linux machine

share|improve this question
    
Is it a public accessible repository? If so, can you give the URL and the file which is working and the one which isn't?! Can you cd into the dir which contains test2.h? – mpy Jun 25 '13 at 19:53
    
Is find. (missing space) a typo in the second command? – RobEarl Jun 25 '13 at 22:00
    
@mpy, no unfortunately it is not a public repository, thus I can't give you the URL...Also, I can cd into the dir that contains test2.h and then, in that case, the find command works – Nosrettap Jun 25 '13 at 22:26
    
@find Yes, that is just a typo, I'll fix that – Nosrettap Jun 25 '13 at 22:27
    
Is src a symbolic link? If so you'll need -L – RobEarl Jun 25 '13 at 22:28

You don't have the r or x access on src directory.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .