Shell Script

Verifying a filesystem mount in a bash script

Sometimes you need to check if a drive is properly mounted before performing a scripted operation.  A few Linux tools can detect whether they are on an NFS share or not, but there is no shorthand to find if a certain path is the mounted filesystem or an empty unmounted directory.

 

Syndicate content