Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: NFS question Keywords: NFS Message-ID: <8282@brl-smoke.ARPA> Date: 31 Jul 88 05:23:32 GMT Article-I.D.: brl-smok.8282 References: <16692@brl-adm.ARPA> <62172@sun.uucp> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <62172@sun.uucp> swilson@sun.UUCP (Scott Wilson) writes: ->How do I recognize a file as being on ->a remote NFS filesystem? -Under SunOS 4.0 at least, I believe the easiest way to do -this is to stat the file, then compare the st_dev value -with the st_dev value gotten from stat'ing all the mount -points. Use the getmntent(3) family to examine /etc/mtab -to find out what has been mounted where. When the st_devs -match you can determine whether the file is NFS or not. Wouldn't it be easier to access the file then see whether the access time had been updated?