Mac UUID Command in Terminal?

cdoolittle17

macrumors newbie
Original poster
Feb 28, 2014
1
0
Hey everyone! :D I'm working on a new piece of software for OS X that will create a Fusion Drive on ANY Mac running 10.8.2 or newer, and it has to have 2 hard drives as well. Anyway, I have everything I need to create the drive except 1 thing. :( For this command, I need to have the UUID of the newly created Fusion Drive. What I want a command to do is to look at the UUID of ANY computers Fusion Drive and auto input it to the command. Not sure how to do this. :confused: Anyone know how? Thanks a ton. If you need my previous commands that I have, just let me know.
 

Weaselboy

Moderator
Staff member
Jan 23, 2005
29,403
8,989
California
This will save the output of the diskutil cs list command to a text file on your Desktop. If you have a Fusion drive this output would include the UUID of the Fusion logical volume. There may be a way you could automatically extract it form the text file or the command output itself?

Code:
diskutil cs list > ~/Desktop/test.txt