LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   problem with find (https://www.linuxquestions.org/questions/linux-general-1/problem-with-find-260144/)

Mclewson 11-28-2004 09:17 AM

problem with find
 
Whenever I issue a find command I get a funky messages returned. Here is an example:

find / -name httpd.conf
/etc/httpd/conf/httpd.conf
find: /proc/6287/task: No such file or directory

What does the last line mean, and why is it coming up?

Thanks
Mclewson

rjlee 11-28-2004 09:36 AM

/proc/ is a virtual filesystem that reports things about the running kernel.

The directory /proc/pid contains information on a running process. In this case, the process ID (PID) of the process is 6827.

The reason that you are seeing this message is that find gets the directory contents of /proc/, as part of its search through the filesystem, and then tries to access each directory in turn.

Unfortunately, the pid process ends in between find reading the directory contents, and actually entering the pid directory. So the attempt to change to that directory fails, hence the error message.

bigrigdriver 11-28-2004 09:49 AM

It probably has to do with two things: user ID (versus root ID) and user directory/file permissions (versus root permissions). When running such a broad search as user (find / searches the entire filesystem), you should get a lot of 'permission denied' returns for the directories user is denied permission to look into. The process in question may be associated with the ID of the individual running find. It may exist for root, but not for user.
Try opening a term and su to root, then run the same find again. See if the same (or similar) line shows up again.

powdered_finn 11-28-2004 10:24 AM

Hi,

You also might want to try "locate" command, just remember to run "updatedb" as root before searching.

p_finn


All times are GMT -5. The time now is 03:31 AM.