![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find the time a filesystem was mounted without using root privileges | neuralninja | Filesystems, Disks and Memory | 1 | 04-04-2008 10:38 AM |
| / filesystem is mounted read only | DGK | UNIX for Dummies Questions & Answers | 2 | 05-18-2007 01:09 AM |
| Remote mount an already mounted nfs filesystem | itsupplies | SUN Solaris | 1 | 09-19-2006 06:31 PM |
| Mounted Root Filesystem | jimthompson | UNIX for Advanced & Expert Users | 1 | 01-17-2006 12:59 PM |
| How can I tell if a filesystem is NFS mounted? | giannicello | UNIX for Dummies Questions & Answers | 3 | 09-23-2002 11:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Testing if nfs filesystem is mounted
Hello,
I have a backup script that backs up my system to a nfs mounted file system. The mount point on my local system is /backup. I want my script to check whether the nfs file system is mounted on /backup before actually backing anything up. Even if the nfs file system was NOT mounted, there would be a /backup directory on my local system. Is there a way I can have my script actually check that the nfs filesystem is mounted on /backup? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Best way depends on the specific OS which no one ever mentions. Some possibilities are "nfsstat -m" and "df /backup". Various option to df may be easier to script than others. You will need to look at your man page.
|
|
#3
|
|||
|
|||
|
Quote:
Thanks. I used the following command: /bin/df -t nfs | /bin/grep /backup Thanks again for your help. |
|||
| Google The UNIX and Linux Forums |