8000 testing mounts · roubles/macmounter Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
roubles edited this page Jul 23, 2015 · 5 revisions

Building on the examples in basic example

There are various ways to test whether a mount is correctly mounted and functional.

Option 1: You can look for the mount in the list of mounts the system thinks it has (using /sbin mount). However, this often results in false positives.

MOUNT_TEST_CMD=/sbin/mount | grep -q example

Option 2: You can try to cd into the mount folder. Usually this is enough to identify if the mount is active. However, this too, sometimes can result in false positives.

MOUNT_TEST_CMD=cd /Volumes/example && /sbin/mount | grep -q example

Option 3: Another way is to ls -l the mount folder. I have had good success with this method.

MOUNT_TEST_CMD=ls -l /Volumes/example && /sbin/mount | grep -q example

Option 4: A foolproof way to make sure your mount is active is to ls or cat a file that you know exists on the mount folder.

MOUNT_TEST_CMD=ls -l /Volumes/example/somefileyouknowabout && /sbin/mount | grep -q example
Clone this wiki locally
0