Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
show 1 more comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.