[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

9479.0. "find's -fstype isn't working as I expected" by CXXC::REINIG (This too shall change) Fri Apr 11 1997 12:58

On augie, I can find a file but I cannot find it with I specify -fstype.
I expected to find it with -fstype nfs.  What am I doing incorrectly?

                                                August G. Reinig

$ uname -a
OSF1 augie.zko.dec.com V4.0 386 alpha

$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr

$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype nfs
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype pc
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype ufs
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype cdfs
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype

$ df /usr/proj/decc2/rtslib/deccxx_tests//collections/agr
Filesystem         ... Mounted on
cosf:/raid0/decc2  ... /tmp_mnt/var/proj/decc2



On cosf I get the results I expect

$ uname -a
OSF1 cosf.zko.dec.com V4.0 386 alpha

$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype nfs
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype pc
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype ufs
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype cdfs
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune -fstype
$ find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -prune
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr

$ df /usr/proj/decc2/rtslib/deccxx_tests//collections/agr
Filesystem   ... Mounted on
/dev/re0g    ... /raid0

T.RTitleUserPersonal
Name
DateLines
9479.1DECWET::MARTINFri Apr 11 1997 16:499
Ummm, just a guess, but:

  -prune
      [XPG4-UNIX]  Always TRUE.  Prunes the search tree at the file.  That
      is, if the current pathname is a directory, The find command does not
      descend into that directory.  In a networking environment, this flag
      keeps the find command from searching through remote file systems.

NFS is a remote file system....
9479.2It turns out that -prune doesn't affect the resultsCXXC::REINIGThis too shall changeMon Apr 14 1997 12:2317
-prune doesn't matter

augie> find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr -fstype nfs
augie> find /usr/proj/decc2/rtslib/deccxx_tests//collections/agr
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/collection_running.lock
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/rts_user_defined_environment.txt
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/test_list.dat
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/rts_parameters.tcl
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/rts_status.tcl
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/rts_OS_parameters.sh
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/union
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/union/union.cxx
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/union/union.sh
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/union/union.out            
/usr/proj/decc2/rtslib/deccxx_tests//collections/agr/union/union

9479.3Maybe the 2 finds are different versionsUNIFIX::HARRISJuggling has its ups and downsMon Apr 14 1997 13:4925
    Check to make sure the version of 'find' is the same on both systems. 
    It is possible that the version you are running on augie is not the
    same as what is running on cosf.
    
    Try doing a 
    
    	which find
    
    to locate the actual command being executed.  Then do a
    
    	what /augie/find
        what /cosf/find
    	cmp /augie/find /cosf/find
    
    to check and see if both versions are identical
    
    Also what version of NFS has been mounted?  nfsv2 or nfsv3 ??  The
    mount command can tell you
    
    	/usr/sbin/mount
    
    If there are differences between the 2 copies of find, then that is the
    first avenue of attack.
    
    					Bob Harris
9479.4I'm guessing you have an old version of find on augieUNIFIX::HARRISJuggling has its ups and downsMon Apr 14 1997 14:0216
    By the way, I just copied a v3.2g version of 'find' to my v4.0b
    workstation and when I tried the v4.0b 'find' against an NFS v3 mounted
    file system it worked, but when I tried the v3.2g version of 'find' it
    didn't find anything.
    
    When I remounted the NFS file system as a nfsv2, the v3.2g version of
    'find' worked correctly.
    
    So my guess is that 'augie' has an old version of 'find' somewhere in
    your PATH and that the file system you are attempting to search is
    mounted using nfsv3.
    
    Find and replace the old version of 'find' on 'augie' if my guess is
    correct.
    
    					Bob Harris
9479.5The two finds are exactly the sameCXXC::REINIGThis too shall changeMon Apr 14 1997 14:5323
$ augie> which find
/usr/ucb/find
augie> what /usr/ucb/find
/usr/ucb/find:
 $RCSfile: crt0.s,v $ $Revision: 1.1.21.11 $ (DEC) $Date: 1995/09/06 19:54:27 $
 $RCSfile: find.c,v $ $Revision: 4.3.23.4 $ (DEC) $Date: 1995/12/14 13:30:01 $
 $RCSfile: perm.y,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1995/06/19 05:50:42 $

cosf> which find
/usr/ucb/find
cosf> what /usr/ucb/find
/usr/ucb/find:
 $RCSfile: crt0.s,v $ $Revision: 1.1.21.11 $ (DEC) $Date: 1995/09/06 19:54:27 $
 $RCSfile: find.c,v $ $Revision: 4.3.23.4 $ (DEC) $Date: 1995/12/14 13:30:01 $
 $RCSfile: perm.y,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1995/06/19 05:50:42 $

cosf> cp /usr/ucb/find ~
augie> cmp ~/find /usr/ucb/find

augie> uname -a
OSF1 augie.zko.dec.com V4.0 386 alpha
cosf> uname -a
OSF1 cosf.zko.dec.com V4.0 386 alpha
9479.6QUARRY::nethCraig NethMon Apr 14 1997 15:267
There appear to have been some fixes to find after V4.0.   In particular,
this comment from a V4.0b fix looks interesting:

 *      3. If '-fstype nfs' , interpret this as nfsv3. getvfsbyname()
 *         returns nfsv2 if "nfs" is the argument.

I'll bet a V4.0b find will work correctly...