December 11, 2007
Navigating to the trashcan and mounted shares in terminal.app
I’m still a terminal newbie but I’m learning every day. Now that I’m familiar with the ls and cd commands* in Unix I encountered two problems today: I wanted to navigate to my trashcan, and I wanted to navigate to a folder on a mounted network share. Here’s how to do both:
Navigating to your trashcan in the terminal

Your trash folder is a hidden folder in your user (home) folder. To navigate to the trash open a new terminal window. Make sure you’re in the home folder (cd ~). Then navigate to your trashcan by this command: cd .trash. ls shows you the contents of the foler you’re in.
Navigating to a folder on a mounted network share in the terminal

To navigate to a mounted network share, go to /Volumes and use ls to see which network shares are mounted.
*: Yes I know these are very basic ;). If someone knows a good terminal guide, fire away!
Some usefull links:
December 11th, 2007 at 1:55 ∞- http://www.macdevcenter.com/pub/a/mac/2005/05/20/terminal1.html?page=1
- http://www.ee.surrey.ac.uk/Teaching/Unix/unix1.html
Here’s a link to a nice overview of the commands that are available to you when using the bash shell: http://www.ss64.com/bash/
Those commands are in no way specific to OS X btw.
Good read:
December 11th, 2007 at 2:19 ∞http://www.macdevcenter.com/pub/a/mac/2004/02/24/bash.html
I’m a Mac newbie, but I know it’s basically Bash and I know there is one command you should never forget: man.
There are plenty of sites with some decent information on “bash commands”. :)
December 11th, 2007 at 2:51 ∞Thanks a lot!
January 5th, 2008 at 4:25 ∞