Chapter 7. Directory Organization

What? Me, Organized?

Computers and offices have one thing in common: you lose things in them. If you walk into my office, you’ll see stacks of paper on top of other stacks of paper, with a few magazines and business cards in the mix. I can often find things, but I’d be lying if I said that I could always find that article I was reading the other day!

When you look at a new computer user’s home directory (Section 31.11) , you often see something similar to my office. You see a huge number of unrelated files with obscure names. He hasn’t created any subdirectories, aside from those the system administrator told him they needed; and those probably aren’t even being used. His home directory probably contains programs for several different projects, personal mail, notes from meetings, a few data files, some half-finished documentation, a spreadsheet for something he started last month but has now forgotten, and so on.

Remember that a computer’s filesystem isn’t that much different from any other filing system. If you threw all of your papers into one giant filing cabinet without sorting them into different topics and subtopics, the filing cabinet wouldn’t do you much good at all: it would just be a mess. On a computer, the solution to this problem is to sort your files into directories, which are analogous to the filing cabinets and drawers.

The Unix filesystem can help you keep all of your material neatly sorted. Your directories are like filing cabinets, ...

Get Unix Power Tools, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.