Using Unix to switch between internal hard drives

Discussion in 'Mac Programming' started by smurray444, Mar 5, 2009.

  1. macrumors newbie

    Joined:
    Jan 19, 2009
    #1
    Dear all,

    I'm using a MacPro with 4 internal hard drives. How is it possible when using Unix to change between the hard drives? If I use 'cd ..' I can get to the very top of the directory of my default hard drive (number 1) but there doesn't appear to be an option to switch between hard drives.

    Any help would be much appreciated.

    Thanks,

    Steve
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    In Unix there is only ever a single root (/). All other drives are mounted within this. In OSX they are mounted in /Volumes/. So do

    Code:
    cd /Volumes/
    ls
    
    and you should see a list of all mounted volumes (other hard drive, network mounts etc)
     
  3. macrumors 6502a

    LtRammstein

    Joined:
    Jun 20, 2006
    Location:
    Denver, CO
  4. macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #4
    Even simpler...

    Type "cd" and then drag and drop the disk drive icon into the terminal. The drop operation will type in the correct text for you. You can also drop any finder folder and the full path to the folder is dropped onto the current prompt line.
     
  5. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    All drives in Unix are mounted below / so if you at the root directory ( / ) then you can see all the drives in the computer including CD / DVD-ROMs / USB drives etc etc. In Mac OS X drives are mounted under /Volumes but in Linux they are often mounted under /mount don't get confused when switching between systems :).
     

Share This Page