When you login to the system, your current working directory is set to your home directory, which is where all
of the files that you own reside. It is named /somedevice/accountname, where
/somedevice is the name of the disk partition or disk drive where your files
physically reside, and accountname is your logon ID.
Many UNIX commands and file operations make reference to your home directory.
To make things easier, and to provide a transparent view of the
physical file system (you do not have to remember what disk drive or partition
your home directory is physically on, or have to worry if for some reason
your files need to be moved to a different device) you should always reference your home directory
by using a tilde ''
''. For example, the command:
cat
.cshrc
is the same as typing:
cat /sulu/myuserid/.cshrc
Similarly, the command:
cd
/bin
sets your current working directory to the directory bin in your home directory.
You can of course reference your directory as /somedevice/accountname, but
if for some reason you were to hard code this into a program, and your files
were to be moved to /someotherdevice/accountname, you would have to recompile
all of your programs. The ''
'' will always work as a reference
to your home directory, no matter what devivce your files physically reside on,
and should be used whenever possible.