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

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

is equivalent to

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.

 



Ross Biro
Tue May 23 13:39:28 PDT 1995