Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2004 12:52:23 -0700
From:      "Julian M. Mason" <jmason@cs.hmc.edu>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>, Lloyd Hayes <wyoming_antelope@yahoo.com>, freebsd-questions@freebsd.org
Subject:   Re: FreeBSD Commands
Message-ID:  <20040615195223.GB11022@turing.cs.hmc.edu>
In-Reply-To: <20040615193256.GA95869@happy-idiot-talk.infracaninophile.co.uk>
References:  <40CF4287.1060005@yahoo.com> <20040615193256.GA95869@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 15, 2004 at 08:32:56PM +0100, Matthew Seaman wrote:

>     cd ~     -- change directory to your accounts home directory

I'm going to expand on this one a little, because it's helpful. To cd to
your home directory (your own little "corner of the file system", where
all your personal files go), run 'cd' (without the quotes...) with no
arguments.

The ~ character is expanded by the shell to mean "path to my home
directory". So, typing 'cd ~' would also take me to my home dir. Also,
'cd ~/music' would take me to the music directory in my home directory,
if I've got one. 

Recall that 'pwd' prints the current working directory:
An example:

# pwd
/usr/home/mac
# ls
Maildir         public_html     storage
# cd /usr/local
# pwd
/usr/local
# cd ~/storage
# pwd
/usr/home/mac/storage
# ls
video
# cd
# pwd
/usr/home/mac
# ls
Maildir         public_html     storage


(where '#' is my prompt)

    --Mac

-- 
Julian "Mac" Mason                          jmason@cs.hmc.edu
Computer Science '06                           (909)-607-3129
Harvey Mudd College



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040615195223.GB11022>