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.

Revisions

  1. luk3ya0 renamed this gist May 23, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. luk3ya0 created this gist Jul 23, 2019.
    10 changes: 10 additions & 0 deletions mntfs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/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