The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-15-2006
Registered User
 

Join Date: Aug 2003
Posts: 27
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?
Reply With Quote
Forum Sponsor
  #2  
Old 03-15-2006
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,656
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.
Reply With Quote
  #3  
Old 03-15-2006
Registered User
 

Join Date: Aug 2003
Posts: 27
Quote:
Originally Posted by Perderabo
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.

Thanks. I used the following command:
/bin/df -t nfs | /bin/grep /backup

Thanks again for your help.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0