SUMMARY: check network drive vs. local drive

From: Jeffrey Liu (jliu@mail.aptix.com)
Date: Wed Nov 26 1997 - 20:04:40 CST


Thanks to Ian MacPhedran who sent me a perl script. Works perfect.

Is there a equivalent C shell script?

Several replies show me how to read output of the df. I know that.
I'll thank them reply also.

Jeffrey

------------- Begin Forwarded Message -------------

>From Ian_MacPhedran@mackenzie.usask.ca Wed Nov 26 17:02:20 1997
Date: Wed, 26 Nov 1997 18:55:04 -0600 (CST)
From: Ian MacPhedran <Ian_MacPhedran@mackenzie.usask.ca>
X-Sender: macphed@mackenzie
To: Jeffrey Liu <jliu@extsvr.aptix.com>
Subject: Re: check network drive vs. local drive
MIME-Version: 1.0

On Wed, 26 Nov 1997, Jeffrey Liu wrote:

> Hi,
>
> Is there a command/short script which
> can tell whether it's network drive or local drive
> of current directory?
>
> Jeffrey

I've done the following in the past under perl. There's likely better
ways.

#!/usr/local/bin/perl
        @statr = stat(".");

        if (($statr[0] < 0) || ($statr[0] > 30000000)) {
                print "Network drive\n";
        } else {
                print "Local drive\n";
        }

Ian.
----------------------------------------------------------------------------
Ian MacPhedran, Engineering Computer Centre, 2B13 Engineering Building,
University of Saskatchewan, 57 Campus Drive, Saskatoon SK S7N 5A9, CANADA
Phone: (306)966-4832 Fax: (306)966-5205 Email: Ian_MacPhedran@engr.USask.CA

------------- End Forwarded Message -------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:10 CDT