-   Linux - General (
-   -   find command on subdirectories (

grob115 03-08-2011 10:34 AM

find command on subdirectories
Believe the find command should search in all subdirectories but for some reason it doesn't on a box I'm working on. For example, if I have the following
find / -name test

It wouldn't find the file /etc/mydir/test, if I execute the command in /etc. Can someone please explain what I need to do to enable search also in the subdirectories recursively?

szboardstretcher 03-08-2011 10:35 AM

You have to be running the command as 'root' to be able to search through system directories.

corp769 03-08-2011 10:37 AM

To add to that, the find command by default searches recursively. I normally use the find command along with grep to find what I need to.

catkin 03-08-2011 10:43 AM

The find command you are using should list subdirectories.

If permissions prevent find reading subdirectories, it will give an error message.

Maybe find is not running /usr/bin/find; what is the output of which find?

All times are GMT -5. The time now is 08:06 PM.