next up previous contents index
Next: 3.3 First Steps into Up: 3.2 Basic UNIX Concepts Previous: 3.2.9 The current working

3.2.10 Referring to home directories

      Under both tcsh and bash,gif your home directory can be referred to using the tilde character (``~''). For example, the command

/home/larry# more ~/papers/history-final

is equivalent to

/home/larry# more /home/larry/papers/history-final

The ``~'' character is simply replaced with the name of your home directory by the shell.

In addition, you can specify other user's home directories with the tilde as well. The pathname ``~karl/letters'' translates to ``/home/karl/letters'' by the shell (if /home/karl is karl's home directory). The use of the tilde is simply a shortcut; there is no directory named ``~''---it's just syntactic sugar provided by the shell.

 



next up previous contents index
Next: 3.3 First Steps into Up: 3.2 Basic UNIX Concepts Previous: 3.2.9 The current working



Matt Welsh
mdw@sunsite.unc.edu