gibney.org
:
Technology
:
Linux
:
Check if a mountpoint is active
(Entry Nr. 1536, by user 1 |
edit
)
<div class=div_content_code>grep -q ' /mount/point ' /proc/mounts && echo 'yeah its mounted'</div> <br> Here is another version that I saw at episteme.arstechnica.com/groupee/forums/a/tpc/f/96509133/m/105002115731 :<br> <br> <div class=div_content_code>#!/bin/bash for mount in $(cut -d' ' -f2 < /proc/mounts) do if [ "$mount" = "/some/mount/point" ] then echo "HOLY BUNGHOLES, BATMAN!"; break fi done </div><br>
Create a new entry at this position