View Single Post

   
  #8 (permalink)  
Old 01-05-2008, 09:09 AM
Tim Moor
 
Posts: n/a
Default Re: check if a filesystem is mounted

thanks to all of you for your help
tim

"Tim Moor" <tim.moor@nospam.com> schrieb im Newsbeitrag
news:4428f9f4$1_2@news.bluewin.ch...
> dear aix gurus,
> is the following script realiable to check, if a filesystem is mounted or
> not ?
>
> thanx alot
> tim
>
> ps: mount point is /comx/data
>
> #!/bin/ksh
> #
> # test fs mount status
> #
> MOUNT_POINT=$(df -M /comx/data 2>/dev/null | awk ' (NR==2) {print $2} ')
>
> if [[ $MOUNT_POINT = "/" ]]; then
> echo "fs is not mounted: $MOUNT_POINT"
> else
> echo "fs is mounted: $MOUNT_POINT"
> fi
>
>



Reply With Quote