The UNIX File System Structure
The UNIX File System Structure
The UNIX file system is composed of two types of entities: files and
directories. Every file and every directory has a pathname
which indicates where that file or directory lives.
Files
Files store information. There are many types of files. Two of the more
common types are text files, which you read, and executable files, which you
run. If you choose the option "Save As..." at the bottom of this
window, a dialog box will appear and prompt you for a "Name for saved
document:". If you type in a name and choose "OK," a text file will be
created under the name you provided.
Files with names starting with a period (i.e. .xstartup) are
invisible in normal UNIX use. You can see them by using a variation of the
ls command.
Just don't delete them. They are there (and invisible) for a reason.
Filenames in UNIX generally do not contain
embedded spaces. If you end up with a filename with embedded spaces, you
can refer to it by enclosing the name in double quotes.
Directories
Directories organize files and other directories, creating
the tree structure of UNIX. When you login to your account, you arrive
in your personal home directory, the root of your personal section
of the UNIX file system tree. Your home directory, in turn, is a
subdirectory within other directories in the file system.
Pathnames
Files and directories are specified by pathnames. The pathname of a file
indicates its location in the filesystem. Two files can have the same
name as long as their pathnames are different. If you choose the option
"Save As..." at the bottom of this window, the dialog box asking you for
a filename will automatically fill in the pathname of your home directory.
An example of a pathname for a user's home directory is /usr/jpower. The
pathname for that user's mail directory might then be /usr/jpower/Mail.
When you tell UNIX to look for a text file, it checks for that file in the
current directory. If the file is in another directory, you must supply
the pathname to the file.
[Navigating the File System]
[UNIX Survival home page]