Last active
May 30, 2018 05:39
-
-
Save pansapiens/d2c4910aee86a9ffe1c4dec2d647de4c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script for mounting NTFS disks on macOS | |
if [ $# -eq 0 ]; then | |
diskutil list | |
echo | |
echo "No arguments provided." | |
echo "Usage: mount-ntfs.sh [diskXsY]" | |
echo "eg: mount-ntfs.sh disk2s2" | |
echo | |
echo "Note: ntfs-3g FUSE driver must be installed:" | |
echo "xcode-select --install && brew install ntfs-3g" | |
exit 1 | |
fi | |
sudo true | |
DISK=$1 | |
if [ ! -d /Volumes/$DISK ]; then | |
sudo mkdir /Volumes/$DISK | |
fi | |
sudo /usr/local/bin/ntfs-3g /dev/$DISK /Volumes/$DISK -olocal -oallow_other |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment