Last active
January 13, 2026 07:01
-
-
Save veltlion/4aaf71aaa83976a2112f0c0772cd1a5c to your computer and use it in GitHub Desktop.
Remount NTFS as read-write on macOS. Need macfuse and ntfs-3g-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/zsh | |
| mount_list=$(mount | grep ntfs | grep read-only) | |
| [ -z "$mount_list" ] && exit 0 | |
| while read line; do | |
| device=$(echo "$line" | awk '{printf $1}') | |
| mount_point=$(diskutil info $device | sed -En 's/ +Mount Point: +//p') | |
| volume=$(basename "$mount_point") | |
| sudo diskutil unmount $device || sudo umount -f $device | |
| if [ $? = 0 ]; then | |
| sudo ntfs-3g $device "$mount_point" \ | |
| -o local,allow_other,auto_xattr,remove_hiberfile,noatime,nodiratime,volname="$volume" && \ | |
| echo Volume "$volume" on $device mounted | |
| fi | |
| done <<< "$mount_list" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dependencies: