Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal ?!

Hi everyone.


I have just made the switch from Win PC to Mac and i would love to learn more (anything) about Terminal and the use of it. I dont know a single command or what it does. I know it's a noobish question, but thats what i am at Mac so far... Any help greatly appreciated 😀

MacBook Pro, Mac OS X (10.7)

Posted on Jul 27, 2011 10:47 PM

Reply
18 replies

Jul 28, 2011 7:57 AM in response to DeeOne

Note that those are fairly complex commands that need to be copied and pasted exactly as they appear (assuming they're correct in the first place). For example in both of the initial commands (sudo cp... and sudo perl...) I can see that a space has been inadvertently inserted in IOAHCIBlockStorage.kext (is IOAHCIBlockStorag e.kext in your post). In both cases I believe this would result in the command failing because it could not find the specified file or directory, but I won't guarantee that is the outcome.



The Terminal is an interface to the underlying UNIX that Mac OS X is built on top of. As long as you trust the source of the suggested commands and you don't run into issues with something adding spaces or unintended new lines in the command they should work as intended. I would agree that you can't cause any hardware damage by running commands in terminal, but you could muck things up enough that your computer will no longer boot.



I would look for info on Darwin (Apple's implementation of UNIX that is accessible through the Terminal), or O'Reilly had some good books on the underpinnings of Mac OS (read the Panther and Tiger books, haven't looked for anything later than that) that provided a lot of information on what could be done with Terminal.



I came to Mac OS X with a strong UNIX background so the availability of Terminal and what can be done with it has always been a big plus for Mac OS for me.

Jul 28, 2011 12:25 PM in response to gbullman

gbullman. I noticed the spaces when i posted it in here, and although I have seen spaces used in command strings, it did not seem to fit in those, and its my own fault as the strings i copied had [REMOVE ME] some places inside, and the space appeared when i did so.

But I followed the page back to its origin and ended up with these strings;


sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage.original


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/IOAHCIBlockStorag e.kext/Contents/MacOS/IOAHCIBlockStorage


sudo kextcache -system-prelinked-kernel


sudo kextcache -system-caches


After the reboot I had a peak at the system info for my SSD, and what do you know - TRIM Support ; YES 😀


No negative side effects yet as far as I can tell

Terminal ?!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.