FreeBSD Commands
Julian M. Mason
jmason at cs.hmc.edu
Tue Jun 15 12:52:30 PDT 2004
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 at cs.hmc.edu
Computer Science '06 (909)-607-3129
Harvey Mudd College
More information about the freebsd-questions
mailing list