Bash Help

Discussion in 'Programming' started by Mark Neil, May 17, 2015.

  1. Mark Neil

    Mark Neil New Member

    Joined:
    May 17, 2015
    Messages:
    2
    Likes Received:
    0
    I'm a little new to bash programming and using Terminal, so I need help with something. Is there a way to check if there are any external drives through a command? I don't necessarily want any information on the drive; I would prefer the command gave me a simple yes, there are external drives connected, or no, there aren't any. Thanks, and sorry for the non-technical language.
     
    Mark Neil, May 17, 2015
    #1
    1. Advertisements

  2. Mark Neil

    Cory Cooper Moderator

    Joined:
    May 19, 2004
    Messages:
    5,099
    Likes Received:
    149
    Hello and welcome.

    There isn't a command that gives a simple yes or no. However, you can see what volumes are currently mounted in Terminal by issuing the following command:

    diskutil list

    It will show all mounted volumes, their partitions, and other information. disk0 is your boot volume, usually your internal, if that is where OS X resides.

    C
     
    Cory Cooper, May 17, 2015
    #2
    Mark Neil likes this.
    1. Advertisements

  3. Mark Neil

    Mark Neil New Member

    Joined:
    May 17, 2015
    Messages:
    2
    Likes Received:
    0
    Awesome. Thanks so much!
     
    Mark Neil, May 17, 2015
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. SOlson

    Adding a directory to PATH in bash

    SOlson, Aug 24, 2006, in forum: Shell Programming
    Replies:
    3
    Views:
    10,997
    ghovde
    Nov 13, 2007
  2. Newsbot

    Bubble Bash [(iPod) iTunes]

    Newsbot, Feb 26, 2008, in forum: Mac Gaming
    Replies:
    0
    Views:
    576
    Newsbot
    Feb 26, 2008
  3. Newsbot
    Replies:
    0
    Views:
    529
    Newsbot
    Mar 10, 2008
  4. Eric Lindsay

    Comments in Bash

    Eric Lindsay, Nov 15, 2005, in forum: Apps
    Replies:
    9
    Views:
    374
    Eric Lindsay
    Nov 17, 2005
  5. Stefan

    Vintage "bash IBM" game

    Stefan, Sep 14, 2009, in forum: Apps
    Replies:
    0
    Views:
    287
    Stefan
    Sep 14, 2009
  6. Chet Ramey

    Bash-3.0 available for FTP

    Chet Ramey, Jul 27, 2004, in forum: Misc
    Replies:
    0
    Views:
    343
    Chet Ramey
    Jul 27, 2004
  7. Chet Ramey

    Bash-3.1 released

    Chet Ramey, Dec 9, 2005, in forum: Misc
    Replies:
    0
    Views:
    329
    Chet Ramey
    Dec 9, 2005
  8. Chet Ramey

    Bash-3.2 available for FTP

    Chet Ramey, Oct 12, 2006, in forum: Misc
    Replies:
    0
    Views:
    417
    Chet Ramey
    Oct 12, 2006
Loading...