Bash Help

Joined
May 17, 2015
Messages
2
Reaction score
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.
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,106
Reaction score
497
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
 
Joined
May 17, 2015
Messages
2
Reaction score
0
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
Awesome. Thanks so much!
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top