UUID Command in Terminal?

Discussion in 'Mac Programming' started by cdoolittle17, Feb 28, 2014.

  1. cdoolittle17 macrumors newbie

    Joined:
    Feb 28, 2014
    #1
    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.
     
  2. kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
  3. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #3
    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
     
  4. kryten2, Feb 28, 2014
    Last edited: Feb 28, 2014

    kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #4
    Yes, pipe the output into for example awk.
     

    Attached Files:

Share This Page