in reply to file remote or local

Try
$inode = (stat("/file/to/check"))[1]; print $inode;
The NFS files have big i-node numbers regarding local files...

Replies are listed 'Best First'.
Re^2: file remote or local
by traveler (Parson) on Jan 23, 2006 at 23:10 UTC
    You really want to check dev which is  $dev = (stat("/file/to/check"))[0];. Compare the value with the value for the remote filesystem's mountpoint.
      And you can get a list of mountpoints from /etc/mtab, figure out their type from the 3rd column, stat the filesystem root for the ones you determine are remote, then see if the device number from the above stat call is one of the remote ones.
      On our solaris systems local filesystems have a device like 800000xh and remote like 45c14xxh. I've not checked all and your experience may vary.

      x in examples is varying data.