Terminal use question - how to access directories start from the hard disk

Member
Posts: 63
Joined: 2005.04
Post: #1
I am learning the terminal and do not know how to do this:

access the directories of my hard disk from the terminal
eg: cd /MacintoshHD/Games/

can this be done and if so how can I do it?
Quote this message in a reply
Member
Posts: 63
Joined: 2005.04
Post: #2
*does it 5 seconds later*

man I'm such a meathead Blink
Quote this message in a reply
Member
Posts: 208
Joined: 2005.04
Post: #3
Also, if you have several different partitions and/or drives, look in /Volumes
Quote this message in a reply
Member
Posts: 63
Joined: 2005.04
Post: #4
Another stupid question

how do you represent spaces when searching through directories?

open /games/Mine Swept/

opens at /games/Mine:
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #5
open /games/Mine\ Swept/
Quote this message in a reply
Member
Posts: 196
Joined: 2003.10
Post: #6
If you hate doing that, and you're using Bash as your shell (10.3 and above, or manually configured below), just hit tab to autocomplete.

for instance, type "open /games/Min(TAB)" and it will fill in the rest. Very handy.
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #7
Of course, if the folder is already visible in the Finder, just drag it to the Terminal window, it will paste its path.
Quote this message in a reply
Member
Posts: 304
Joined: 2002.04
Post: #8
Also fyi you can drag any file or folder on top of the terminal window and Terminal.app will insert the full path.
Quote this message in a reply
Member
Posts: 63
Joined: 2005.04
Post: #9
neato, thanks guys
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #10
Byron Clarke Wrote:Another stupid question

how do you represent spaces when searching through directories?

open /games/Mine Swept/

opens at /games/Mine:

Hey, that's my game. Smile

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #11
Or you can put the path in quotes, and you won't have to escape the spaces.
Quote this message in a reply
Member
Posts: 63
Joined: 2005.04
Post: #12
-malarkey-

lol my shareware $ is still in the mail :-) great job with the app. I have one complaint though (a small bug in the program maybe)

when you flag all of the mines, you still have to click all of the spaces before it acknowledges the win. adds a lot of time if you're going for the high score.

other than that its perfect
Quote this message in a reply
Member
Posts: 257
Joined: 2004.06
Post: #13
Byron Clarke Wrote:-malarkey-

lol my shareware $ is still in the mail :-) great job with the app. I have one complaint though (a small bug in the program maybe)

when you flag all of the mines, you still have to click all of the spaces before it acknowledges the win. adds a lot of time if you're going for the high score.

other than that its perfect

Really? Blink I'm pretty sure that's not the case since I have code specifically in there to check when you have all the mines flagged and to end the game right there. I'll check it out, though.

Edit: Nope, you're right. It's a bug. Good catch. Smile

Edit: Oh wait, it's not a bug, it's a feature. Smile The reason it's that way is because if the game ends when you correctly flag all the mines without revealing all the squares, it becomes easy to cheat the last mine by marking and unmarking mines until the game ends.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Hard drive recover Carlos Camacho 4 1,201 Jan 10, 2014 02:27 PM
Last Post: EvolPenguin
  Is there a way to access old posts? spikey 3 1,884 Jul 2, 2013 10:50 AM
Last Post: AnotherJake
  Hard drives Carlos Camacho 5 3,691 Mar 4, 2010 03:22 PM
Last Post: SethWillits
  iPhone’s Very Own Credit Card Terminal michelle2010 0 2,059 Jan 11, 2010 10:59 AM
Last Post: michelle2010
  Replacing MacBook Pro Hard Drive BeyondCloister 4 3,543 Dec 27, 2008 09:58 AM
Last Post: BeyondCloister