Organizing Your Home Directory
Creating many directories has several advantages:
First, it is easier to find any particular file if your home directory
is well-sorted. Imagine a rack of filing cabinets that isn't
sorted; people just insert files wherever they fit. You may as well
throw your data out; when you need something, you'll never be able to
Second, UNIX can access files much faster when directories are
relatively small. Ideally, directories should have at most 60 (or so)
files in them.
Third, directories are an important part of
UNIX file protection (22.1
You can use directories to help protect certain files against access by
Make directories liberally! Make a new directory for every new
project you start; make subdirectories within these directories for
subtopics. Your home directory should ideally contain
but subdirectories. Here are some recommended conventions:
If you're a programmer, create a new directory for each project.
For example, create a directory called src
files, a directory called doc
for documentation, a
directory called obj
for object files, a directory called
for the current working version (or almost-working version)
of the program, a directory called test
for test files and
results, and so on. If the program is large, your src
(and your obj
directory) should also be split into different
subdirectories, each containing different parts of the project.
It's a good idea to put all personal files (as opposed to work
files) in a directory that can be protected against snoopers.
Many users save all of their
in one directory (often called
), which is then divided into subdirectories by topic. I
use a variation of this scheme; I keep general mail in my Mail
directory, but I save correspondence about particular projects
with the project itself. For example, my Power Tools mail is
shelved with the source code for this article.
shows some quick ways to make directories.