A User's Directories

[previous] [next] [table of contents] [index]

Much of the Figure Important parts of a UNIX filesystem shows the directories for a user named ehuser. The home directory /u/ehuser holds the MH Profile. The Mail directory and its subdirectories are for MH. If the user wants any shell scripts or other programs, bin holds them.

bin Directory

The gray arrow pointing out of the bin directory is a symbolic link named replx. It points to the executable repl program in the MH binaries directory. ehuser also has a shell program named fols in her bin.

The MH Directory and Subdirectories

The MH directory (named Mail in this example) has two subdirectories. MH uses these directories as mail folders; there might be many more of them. The MH directory also has several files; some are explained here and others are covered in later chapters.
Drafts
When you make a new draft message, MH stores the draft in a file in the MH directory. The draft file is named (logically enough) draft. Alternatively, MH can make a folder for holding many draft messages. This folder is called (are you ready?) a draft folder. The Section Working with Draft Messages covers drafts in detail.
Library Files
The Mail directory has ehuser's private version of the components and mhl.format files, which MH will use instead of the corresponding file in the MH library directory. There's also a replxfilt filter file for the replx command (which is in her bin).
Context File
Each user's MH directory has its own context file. This file keeps track of your current folder and private sequences. If you've used any read-only folders (another user's folders, for instance), all information about them is stored here.
Folders
A folder (such as the people folder in the Figure Important parts of a UNIX filesystem) has one text file for each message in the folder. The name of the message file is the message number. So the people folder has two messages in it, numbers 1 and 2. (There can be other messages, but they aren't shown in the diagram.)

The files whose names start with commas are "deleted" messages. File ,6 in the people/friends folder is an example. The rmm command prepends a comma to the filename (some systems use other characters). This "hides" the message from MH commands, but gives you a chance to recover the deleted message. At a later time, a system program normally removes "deleted" messages. This is covered in the Section Removing and Recovering Messages.

.mh_sequences
In each folder (and subfolder), an .mh_sequences file keeps track of the sequences in the folder. (More exactly, public sequences are stored in .mh_sequences. Private sequences are kept in the context file.) Sequences are the lists of message numbers that you set with commands like mark and pick. There's a sequence called cur that holds the current message number, an unseen sequence that lists unread messages, and more.
Subfolders
The people folder has two subfolders named friends and colleagues. Each of these subfolders has the same structure as people. They both have .mh_sequences files for themselves. They can even have subfolders... and sub-sub-subfolders. (But note that xmh under X11 Release 6 only recognizes one level of subfolders. If you happen to have sub-sub...folders, xmh will ignore them. The X11 Release 3 version doesn't handle subfolders at all.) The only difference between a folder and subfolder is the name; see the Section Relative Folder Names for more information.

[Table of Contents] [Index] [Previous: System Mailboxes] [Next: Special Files for xmh]


Last change $Date: 1996/06/06 15:08:36 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>