The C shell, ksh
have a shortcut for the pathname to your home
You could change your current directory to your home directory by
If your shell understands the tilde, it should also have an abbreviation for other users' home directories: a tilde with the username on the end. For example, the home directory for mandi , which might really be /usr3/users/mfg/mandi , could be abbreviated ~mandi . On your account, if Mandi told you to copy the file named menu.c from her src directory, you could type:
The Bourne shell doesn't have anything like ~mandi . Here's a trick that's probably too ugly to type a lot - but it's useful in Bourne shell scripts, where you don't want to "hardcode" users' home directory pathnames. This command calls the C shell to put mandi 's home directory pathname into $dir :
username=mandi dir=`csh -fc "echo ~$username"`
The tilde is a good thing to use in your, too.