find strangeness

Jim Jagielski jim at jagmac2.gsfc.nasa.gov
Sat Aug 18 00:41:16 AEST 1990


It seems that /bin/find has a bit of a bug in it. It seems to happen with
directory names that start with "."... maybe the below will illustrate
what I mean.

---------------------------------------------------------------

(567) $ find / -name core -depth -print      /* try absolute referencing */
find: cannot chdir to /usr2/misc/cops
find: cannot chdir to /usr2/src/ftpd_src/RCS
find: cannot chdir to /usr2/changes
find: cannot chdir to /Mail
find: bad directory tree                      /* Huh??!!?? */
(568) $ cd /
(569) $ find . -name core -depth -print       /* now try relative */
find: cannot chdir to ./usr2/misc/cops
find: cannot chdir to ./usr2/src/ftpd_src/RCS
find: cannot chdir to ./usr2/changes
find: cannot chdir to ./Mail
find: cannot chdir to ./.elm                /* Oh, gets hung here */
find: cannot chdir to ./etc/boot.d
find: cannot chdir to ./etc/init.d
find: cannot chdir to ./etc/install.d
find: cannot chdir to ./etc/master.d
find: cannot chdir to ./etc/startup.d
find: cannot chdir to ./etc/uninstall.d
find: cannot chdir to ./usr/lib/uucp
find: cannot chdir to ./usr/spool/cron
find: cannot chdir to ./usr/spool/netmail
find: cannot chdir to ./root
find: cannot chdir to ./Useful Commands
(570) $ find /. -name core -print            /* absolute and relative */
find: cannot chdir to /./usr2/misc/cops
find: cannot chdir to /./usr2/src/ftpd_src/RCS
find: cannot chdir to /./usr2/changes
find: cannot chdir to /./Mail
find: cannot chdir to /./.elm
find: cannot chdir to /./etc/boot.d
find: cannot chdir to /./etc/init.d
find: cannot chdir to /./etc/install.d
find: cannot chdir to /./etc/master.d
find: cannot chdir to /./etc/startup.d
find: cannot chdir to /./etc/uninstall.d
find: cannot chdir to /./usr/lib/uucp
find: cannot chdir to /./usr/spool/cron
find: cannot chdir to /./usr/spool/netmail
find: cannot chdir to /./root
find: cannot chdir to /./Useful Commands
(571) $

------------------------------------------------------------------------

I don't think that the protection of /.elm has anything to do with it
although if root does it, it works, so maybe it does...

Weird...


--
=======================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim at jagmac2.gsfc.nasa.gov               Greenbelt, MD 20771

"Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach
 the very, very top, and then it tends to slope away rather sharply."



More information about the Comp.unix.aux mailing list