Filters are very useful once you are an experienced user, but they have one small problem. How do you store the information? Surely you aren't expected to type everything in each time you are going to use the program! Of course not. Unix provides files and directories.directory
A directory is like a folder: it contains pieces of paper, or files.
A large folder can even hold other folders--directories can be inside
directories. In Unix, the collection of directories and files is
called the file system.; Initially, the file system
consists of one directory, called the ``root''
directory.; Inside this directory, there are
more directories, and inside those directories are files and yet more
directories.
Each file and each directory has a name. It has both a short name, which can be the same as another file or directory somewhere else on the system, and a long name which is unique. A short name for a file could be joe, while it's ``full name'' would be /home/larry/joe. The full name is usually called the pathpath. The path can be decode into a sequence of directories. For example, here is how /home/larry/joe is read:
/¯home/¯larry/¯joeFirst, we are in the root directory.\+
This signifies the directory called home. It is inside the root directory.\+
This is the directory larry, which is inside home.\+
joe is inside larry. A path could refer to either a directory or a filename, so joe could be either. All the items before the short name must be directories.
An easy way of visualizing this is a tree diagram. To see a diagram
of a typical system, look at Figure .
Please note that this diagram isn't complete--a full system
has over 8000 files!--and shows only some of the standard
directories. Thus, there may be some directories in that diagram that
aren't on your system, and your system almost certainly has
directories not listed there.
=1.0pt
;;
Figure: A typical (abridged) Unix directory tree.