![]() |
|
|
|
|
|||||||
| 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 |
| Taking JPA for a Test Drive | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 02:10 AM |
| How to test for a specific file size | GEBRAUN | UNIX for Dummies Questions & Answers | 1 | 02-20-2006 08:50 AM |
| Fibre connection Point to Point SUN | kie | UNIX for Advanced & Expert Users | 6 | 05-20-2003 08:20 AM |
| how to assign same mount point for file systems mounted on physical disks | Hitesh Shah | Filesystems, Disks and Memory | 6 | 04-18-2003 11:42 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Test to see if a drive is mounted at a specific point
I have a script that backs up our storage drive daily to one external drive and weekly to another. What I'd like to do is find a way, in the script, to test whether the drives are mounted so that it doesn't accidentally fill up the main drive in the event of a drive failure, etc. Any ideas on how to accomplish this?
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You can use the df command to get the device associated with a mount.
Check your man page for df as it may not have the -v option I show in the example. df -v /var |tail -1|awk '{print $2}' |
||||
| Google The UNIX and Linux Forums |