From owner-freebsd-questions Sat Sep 9 12:40:42 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA25506 for questions-outgoing; Sat, 9 Sep 1995 12:40:42 -0700 Received: from mpp.minn.net (mpp.Minn.Net [204.157.201.242]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA25500 for ; Sat, 9 Sep 1995 12:40:39 -0700 Received: (from mpp@localhost) by mpp.minn.net (8.6.11/8.6.9) id OAA11714 for freebsd-questions@freebsd.org; Sat, 9 Sep 1995 14:41:35 -0500 From: Mike Pritchard Message-Id: <199509091941.OAA11714@mpp.minn.net> Subject: odd behavior of find To: freebsd-questions@freebsd.org Date: Sat, 9 Sep 1995 14:41:34 -0500 (CDT) X-Mailer: ELM [version 2.4 PL24 ME7a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1476 Sender: questions-owner@freebsd.org Precedence: bulk In my /etc/weekly script, I issue the following command to find any core files that may be laying around: echo "" echo "Checking for core files" find / -fstype local -name core -o -name "*.core" -ls After doing some work on the fdesc file system, I left a fdesc file system mounted at /fd. There is a comment in the fdesc code that says it doesn't set the MNT_LOCAL flag for the file system to work around a bug in fts() (which find uses). Fine. Except that "find" is still descending into the file system and getting an error - "find: 6: Bad file descriptor". If I unmount /fd, the problem goes away. Mount correctly shows that fdesc is not a "local" file system, /dev/sd1a on / (local) /dev/sd1f on /usr (local, with quotas) /dev/sd2a on /usr/var (local, with quotas) procfs on /proc (local) kernfs on /kern (local) fdesc on /fd I tried looking at find, but got a headache trying to figure out exactly how the -fstype option works. Removing the "-fstype local" also makes the error disappear. Does anyone have any ideas why the "-fstype local" option is behaving this way? Here is the output from /etc/weekly: > Checking for core files > find: 6: Bad file descriptor > 55928 416 -rw------- 1 root mpp 200704 Sep 6 10:53 /usr/home/mpp/src/fsdb/fsdb.core > 8222 544 -rw------- 1 root wheel 266240 Sep 2 12:05 /var/cron/cron.core -- Mike Pritchard mpp@mpp.minn.net "Go that way. Really fast. If something gets in your way, turn"