ONLamp.com
oreilly.comSafari Books Online.Conferences.

advertisement


Organizing Files

by Karl Vogel
12/15/2005

The problem: the filesystem on my Unix workstation was a mess. I couldn't find anything without grepping all over creation. About half the time, I'd actually find something useful. Usually I'd get no hits at all, or I'd match something like a compiled binary and end up hosing my display beyond belief.

I wrote this from a Unix/Linux perspective, but Mac users running a recent version of the operating system should be able to make sense of it. Here are some terms for non-Unix types:

  • A Unix home directory is the equivalent of wherever you keep most of your working files. The tilde (~) is just shorthand for that directory, as is $HOME.
  • The cat command displays a file to your screen.
  • Folder names use / instead of \ as separators.

What Didn't Work

This is what didn't do the trick.

Making my own categories

I tried about six different categorization schemes, all of which went nowhere. Poking around in the IBM and Red Hat distribution web pages gave me setups that looked like this:

  • Admin, utilities for system administration
  • Databases, database servers and clients
  • Development, compilers, interpreters, debuggers, and so on.
  • Documentation, useful documentation such as FAQs and how-to's
  • Editors, programs for editing files
  • File, programs for modifying files
  • Graphics, programs for creating and editing images
  • Libraries, anything used to build something else
  • Mail, mail clients, servers, sorters, and notifiers
  • Misc, anything that doesn't fit in another category
  • Network, servers, clients, and testers
  • News, programs for accessing Usenet
  • Printing, printing tools and servers
  • Shells, different shells
  • Text processing, programs to format and print text
  • Web, web servers, clients, and utilities
  • X Windows, X Window managers, and desktop managers

Making the directory tree was easy. Figuring out where to put things under it wasn't. For example, I learned how to use a program such as tcpdump, which is great for examining network traffic to find out why two of your systems aren't working and playing nicely together.

Where does it go? Should it be Networks? Well, only systems people can use the program, because it's for troubleshooting and you can see vital information such as passwords and the contents of email messages in transit--so how about Admin? I'm not storing the software as such, just instructions on how to use it--so how about Documentation?

Notice the Misc category? Where do you suppose most stuff ended up?

Making a projects directory

A friend of mine had a well-organized system, and I happened to notice that he had a directory called projects under his home directory. It sounded good, so I made one, too.

Do I use the project name for each separate project? Oops, some projects have either duplicate or very close names. How about using the name of the person requesting the work? Does a two-minute job count as a project?

In short, this had all the same defects I encountered when making up my own categories, plus some brand-new ones.

Dumping it all in $HOME

I tried this during my "to hell with it" phase, and wound up with more than 1,000 files in my home directory. Take a wild guess how well that worked out.

Separating files by file type

I then tried putting text files in one area, PDF files in a second, web pages used for presentations in a third, and so on.

This only gave me a bunch of strangely named files without much in common, in no particular order. At least I could grep through the text files without accidentally getting a match from a PDF file and seeing gibberish all over my screen.

Treating it all as email

I noticed someone else storing most of his daily work as email. Anything having to do with a given project all ended up in a mail folder, and he could just use the mail reader of his choice to navigate around in it. That sounded cool.

Six hundred fifty-eight email folders later, I noticed a tiny problem. Where did I put that security notice about Solaris operating systems? Was it in the security folder or the solaris folder? And why did I put it in this one when it clearly should have gone into the other one? (Pick whatever values you like for "this" and "the other.")

All these methods had one thing in common: putting a bunch of semistructured information somewhere and expecting it to magically organize itself. Trying to impose additional order on stuff like this is a waste of time when you consider how much new semistructured information we send and receive every day.

Linux Server Hacks, Volume Two

Related Reading

Linux Server Hacks, Volume Two
Tips & Tools for Connecting, Monitoring, and Troubleshooting
By William von Hagen, Brian K. Jones

Pages: 1, 2, 3, 4, 5, 6, 7

Next Pagearrow





Sponsored by: