Skip to content

Instantly share code, notes, and snippets.

@luk3ya0
Last active May 23, 2021 20:49
Show Gist options
  • Select an option

  • Save luk3ya0/ba7ca7938f6c086b3212c93b0cc8339a to your computer and use it in GitHub Desktop.

Select an option

Save luk3ya0/ba7ca7938f6c086b3212c93b0cc8339a to your computer and use it in GitHub Desktop.
mount the ntfs on Mac
#!/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