Last active
May 23, 2021 20:49
-
-
Save luk3ya0/ba7ca7938f6c086b3212c93b0cc8339a to your computer and use it in GitHub Desktop.
mount the ntfs on Mac
This file contains hidden or 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 | |
| disk_item=`mount | grep disk | grep -v disk1 | grep '(ntfs' | grep 'read-only' | head -1 | awk '{print $1}'` | |
| disk_tmnt=`mount | grep disk | grep -v disk1 | grep '(ntfs' | grep 'read-only' | head -1 | awk '{print $3}'` | |
| umount $disk_item | |
| mkdir "$disk_tmnt" | |
| mount_ntfs -o rw,nobrowse $disk_item "$disk_tmnt" | |
| echo "mount the volume at mode w successfully: `mount | grep disk | grep -v disk1 | grep $disk_item`" | |
| open $disk_tmnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment