May 2007
Beginner
628 pages
15h 46m
English
You are not sure what directory you are in, and the default prompt is not helpful.
Use the pwd built-in command, or set a more useful prompt (as in Customizing Your Prompt). For example:
bash-2.03$ pwd /tmp bash-2.03$ export PS1='[\u@\h \w]$ ' [jp@solaris8 /tmp]$
pwd stands for print working
directory and takes two options. -L displays
your logical path and is the default. -P displays your physical location, which may
differ from your logical path if you have followed a symbolic link.The
cd command also provides the -P
and -L switches.
bash-2.03$ pwd /tmp/dir2 bash-2.03$ pwd -L /tmp/dir2 bash-2.03$ pwd -P /tmp/dir1
Read now
Unlock full access