This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 22nd, 2012  |  syntax: Bash  |  size: 0.72 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. TRIM can be enabled by using the following Terminal commands. Copy these commands and run them in Terminal:
  2. Backup the file that you’re about to patch:
  3.  
  4. sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original
  5.  
  6. Patch the file to enable TRIM support:
  7.  
  8. sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
  9.  
  10. Clear the kext caches:
  11.  
  12. sudo kextcache -system-prelinked-kernel
  13. sudo kextcache -system-caches
  14.  
  15. Important: reboot your Mac!
clone this paste RAW Paste Data