The terminal and accessing external drives

Discussion in 'Mac Basics and Help' started by Mr. Anderson, Aug 16, 2007.

  1. Mr. Anderson Moderator emeritus

    Mr. Anderson

    Joined:
    Nov 1, 2001
    Location:
    VA
    #1
    Ok, I really feel like a noob right now. I did a search here and online and can't really find anything - well, I found too much to wade through. So I'm asking now.

    I have an external memory card that comes up on the desktop as a drive, but how do I access that through the terminal?

    D
     
  2. Stamen macrumors newbie

    Joined:
    Aug 16, 2007
    #2
    Nah, not a noob question at all, it's more of an intermediate command-line question.

    It's in a folder called Volumes in the root:
    /Volumes/YourExternalDriveHere

    OS X auto-mounts it into that folder, of course you can remount it anywhere, but that's where it is by default.

    If you're not familiar with mounts in *nix, basically any drive/volume can be mounted to any folder. That's how you access them. In the old days, you had to do this manually; you would connect the drive, create a folder or use an existing one, then mount it to that folder. Once you've done that, all the drives folders and files will be in that folder of yours. You can unmount it and remount it to a new folder if you like. These days, it is automatically done for in OS X and Linux and such. This mounting feature, is far superior to Windows drives system (c:, d:, etc) IMHO.
     
  3. elfin buddy macrumors 6502a

    elfin buddy

    Joined:
    Sep 16, 2001
    Location:
    Tuttlingen, Germany
    #3
    Interesting...I didn't know you could mount drives anywhere. Out of curiosity, how does one manually mount a drive?
     
  4. SilentPanda Moderator emeritus

    SilentPanda

    Joined:
    Oct 8, 2002
    Location:
    The Bamboo Forest
    #4
    If you want to be Uber leet just type:

    cd <space>

    then drag the volume from your desktop to the terminal window. It'll fill in the rest.
     
  5. Mr. Anderson thread starter Moderator emeritus

    Mr. Anderson

    Joined:
    Nov 1, 2001
    Location:
    VA
    #5
    Thanks!!

    I used to program on a Unix workstation back in the day and I know my way around shell script and the command line interface. I was just drawing a blank here.

    I love the drag and drop, though. That's very slick and I would never have thought of that.

    D :D
     
  6. Stamen macrumors newbie

    Joined:
    Aug 16, 2007
    #6
    In command-line you normally use mount and umount commands *nix. In OS X, you can use diskutil for getting info on your disk, as well as other things. To mount MSDOS drives (what most thumb drives are) use mount_msdos. I have a thumb drive called TINYUSB (disk1s1). Here are some examples commands:
    * diskutil list
    * diskutil info disk1s1
    * umount /Volumes/TINYUSB
    * mkdir ~/MyNewFolderMount
    * mount_msdos /dev/disk1s1 ~/MyNewFolderMount
    * open ~/MyNewFolderMount

    You can use "diskutil unmount" to unmount also. And "diskutil mount" to mount, and that follows the "standard" OS X way, which mounts the disks in /Volumes. Finder has a few issues, in Tiger, when you mount it manually, but I don't think there are any problems with this.
     

Share This Page