in reply to Re: file remote or local
in thread file remote or local

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.

Replies are listed 'Best First'.
Re^3: file remote or local
by sgifford (Prior) on Jan 24, 2006 at 04:15 UTC
    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.
Re^3: file remote or local
by tweetiepooh (Hermit) on Jan 24, 2006 at 10:11 UTC
    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.