The original post was about locate world-writeable file and setuid files...etc. I want to limited the find to local filesystems only. I don't want multiple NFS clients run the find on the same NFS export. I got some permission errors and "Stale NFS file handle" errors with "-local". There were many many replies. Sorry, I can't list everyone replied. The suggestions are: 1. It is your fault, RTFM again. Manpage said -local *WILL* descend the hierarchy of non-local directories. 2. Check out "-prune" Always yields true. Does not examine any directories or files in the directory structure below the pattern just matched. 3. use -xdev Same as -mount primary 4. try -mount 5. Manpage! There's an example in the manpage Example 9: Printing local files without descending non-local directories %find . ! -local -prune -o -print Anwser ======== 1. The main point is "-local" still descend NFS mounted directories. That's why I got some errors. 2. To get the job done---> Since I want find to drill down from / on many systems with probably different filesystem setup. I can't use "-mount" for each filesystem. Darren Dunham pointed out that find / \( -fstype ufs -o -fstype vxfs \) -type f -perm -6000 -print >All that happens there is that the result on remote files is false. It >doesn't stop the recursion. You need -prune for that. That's what >Example 9 in the man page does. Dan Stromberg suggested > find . -fstype nfs -prune -o -print Nope, I don't have an exact answer yet. I was out yesterday. I played with this a bit this morning. The followings seems to good so far find / -fstype nfs -prune -o -perm -2 -print find / \! -local -prune -o -perm -2 -print Thanks a lot ... and I'll remember to boot up my brain before reading the man page. =============================== William ----- Forwarded by William Kwan/NewYork/DBNA/DeuBa on 08/26/2005 10:59 AM ----- "William Kwan" <william.kwan+external@db.com> Sent by: sunmanagers-bounces@sunmanagers.org 08/23/2005 04:29 PM To sunmanagers@sunmanagers.org cc Subject find and NO nfs Hi all, I want to look for some files and dont' need to look at things other than ufs and vxfs. I absolutely dont' need to look at NFS also. I did this find / -local -type f -perm -6000 -print and - it take much longer than it should - I got a few error message on can't read some user home dir mounted by autofs - and got this "find: cannot open /: Stale NFS file handle" (I was root) Tried this and seems to have the same problem. find / \( -fstype ufs -o -fstype vxfs \) -type f -perm -6000 -print Is it me using the wrong find syntax or is this system build version? thanks in advance and I'll summarize even it is a dumb mistake =) William _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagers _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Fri Aug 26 12:02:40 2005
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:51 EST