🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #845

Re: problem with find and NFS

#845
From: Marion Hakanson
Date: Wed, 17 May 1989 23:34
36 lines
1862 bytes
In article <2400044@kailand> pwolfe@kailand.kai.com writes:
>. . .
>"root access" on NFS file systems (yes, I know it is a configurable option, but
>I like it that way).  Sequent has added the "-fstype" and "-prune" options to
>the find command for this purpose, but I can't get these options to work.
>
>The command:
>	find / -type f \( -fstype nfs -prune \) \
>		-o \( -name '#*' -o -name 'core' \) \
>		-atime +3 -exec ls -aFgl {} \; -exec rm -f {} \;
>
>produces the same error messages as:
>	find / -type f \( -name '#*' -o -name 'core' \) \
>		-atime +3 -exec ls -aFgl {} \; -exec rm -f {} \;


Whenever I want to convert an old pre-NFS "global find" command to run
on a machine with NFS mounts (and with a "find" which supports the
-fstype and -prune operators), I start with the template:

	find dirs rest-of-find-args

		becomes

	find dirs -fstype nfs -prune -o \( rest-of-find-args \)

Judicious use of escaped newlines and indenting can make the result
more readable, and some logical simplification may be possible, but
this simple approach works.  Your version causes find to have to
access the inode just to satisfy the "-type f" portion of the command,
before getting to the part that keeps find from crossing the remote
mount point.

-- 
Marion Hakanson         Domain: hakanson@cs.orst.edu
                        UUCP  : {hp-pcd,tektronix}!orstcs!hakanson
Technical Details
Message-ID: <10677@orstcs.CS.ORST.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!orstcs!mist!hakanson
References: <2400044@kailand>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!orstcs!mist!hakanson
From: hakanson@mist.CS.ORST.EDU (Marion Hakanson)
Newsgroups: comp.sys.sequent
Subject: Re: problem with find and NFS
Message-ID: <10677@orstcs.CS.ORST.EDU>
Date: 17 May 89 23:34:54 GMT
References: <2400044@kailand>
Sender: usenet@orstcs.CS.ORST.EDU
Reply-To: hakanson@mist.CS.ORST.EDU (Marion Hakanson)
Organization: Oregon State Univ. -- Computer Science
Lines: 36