Skip to content

Instantly share code, notes, and snippets.

View ChenxiSSS's full-sized avatar
🎯
Focusing

Chenxi Shan ChenxiSSS

🎯
Focusing
  • Shanghai <- Cologne <- Shanghai <- Hefei
View GitHub Profile
@ChenxiSSS
ChenxiSSS / fix_exfat_drive.md
Last active November 14, 2024 01:07 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs since exFAT drives may or maynot randomly get corrupted.

In my case, "not ejected properly" often casue the drive in Resource busy, Volume on xxx failed to mount, File system check exit code is 1, or Timed out waiting, when try to use both Disk Utility or diskutil to mount, repair, or first aid the disk.

Possible fix is this:

  1. Use diskutil list to find the right drive id.
    • You want the id under the IDENTIFIER column, it should look like disk1s1.
    • disk1 marks the entire Disk. disk1s1 or disk1s2 marks each Volume.
  2. Usually, you want to check if the disk is occupied by one or many process.
@ChenxiSSS
ChenxiSSS / copy-from-time-machine.sh
Created January 13, 2021 06:02 — forked from magicoli/copy-from-time-machine.sh
Copy data from a Time Machine volume mounted on a Linux box.
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#