1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
|
.\"
.\" %nmhwarning%
.\" $Id: refile.man,v 1.5 2001/01/25 21:15:58 ssen Exp $
.\"
.TH REFILE %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
.SH NAME
refile \- file message in other folders
.SH SYNOPSIS
.HP 5
.na
.B refile
.RI [ msgs ]
.RB [ \-draft ]
.RB [ \-link " | " \-nolink ]
.RB [ \-preserve " | " \-nopreserve ]
.RB [ \-unlink " | " \-nounlink ]
.RB [ \-src
.IR +folder ]
.RB [ \-file
.IR file ]
.RB [ \-rmmproc
.IR program ]
.RB [ \-normmproc ]
.I +folder1
\&...
.RB [ \-version ]
.RB [ \-help ]
.ad
.SH DESCRIPTION
.B Refile
moves (see
.BR mv (1))
or links (see
.BR ln (1))
messages
from a source folder into one or more destination folders.
.PP
If you think of a message as a sheet of paper, this operation is not
unlike filing the sheet of paper (or copies) in file cabinet folders.
When a message is filed, it is linked into the destination folder(s)
if possible, and is copied otherwise. As long as the destination
folders are all on the same file system, multiple filing causes little
storage overhead. This facility provides a good way to cross\-file or
multiply\-index messages. For example, if a message is received from
Jones about the ARPA Map Project, the command
.PP
.RS 5
refile\0cur\0+jones\0+Map
.RE
.PP
would allow the message to be found in either of the two folders `jones'
or `Map'.
.PP
You may specify the source folder using
.B \-src
.IR +folder .
If this is
not given, the current folder is used by default. If no message is
specified, then `cur' is used by default.
.PP
The option
.B \-file
.I file
directs
.B refile
to use the specified file
as the source message to be filed, rather than a message from a folder.
Note that the file should be a validly formatted message, just like
any other
.B nmh
message. It should
.B NOT
be in mail drop format
(to convert a file in mail drop format to a folder of
.B nmh
messages,
see
.BR inc (1)).
.PP
If a destination folder doesn't exist,
.B refile
will ask if you want
to create it. A negative response will abort the file operation. If the
standard input for
.B refile
is
.B not
a tty, then
.B refile
will not ask any questions and will proceed as if the user answered
\*(lqyes\*(rq to all questions.
.PP
The option
.B \-link
preserves the source folder copy of the message (i.e.,
it does a
.BR ln (1)
rather than a
.BR mv (1)),
whereas,
.B \-nolink
(the default) deletes the filed messages from the source folder.
.PP
Normally when a message is refiled, for each destination folder it
is assigned the number which is one above the current highest message
number in that folder. Use of the
.B \-preserv
switch will override
this message renaming, and try to preserve the number of the message.
If a conflict for a particular folder occurs when using the
.B \-preserve
switch, then
.B refile
will use the next available message number
which is above the message number you wish to preserve.
.PP
If
.B \-link
is not specified (or
.B \-nolink
is specified), the filed
messages will be removed from the source folder. The default is to
remove these messages by renaming them with a site-dependent prefix
(usually a comma). Such files will then need to be removed in some
manner after a certain amount of time. Many sites arrange for
.B cron
to remove these files once a day, so check with your
system administrator.
.PP
Alternately, if you wish for
.B refile
to really remove the files
representing these messages from the source folder, you can use the
.B -unlink
switch (not to be confused with the
.B \-link
switch). But
messages removed by this method cannot be later recovered.
.PP
If you prefer a more sophisticated method of `removing' the messages
from the source folder, you can define the
.B rmmproc
profile
component. For example, you can add a profile component such as
.PP
.RS 5
rmmproc: /home/coleman/bin/rmm_msgs
.RE
.PP
then
.B refile
will instead call the named program or script to
handle the message files.
.PP
The user may specify
.B \-rmmproc
.I program
on the command line to
override this profile specification. The
.B \-normmproc
option forces
the message files to be deleted by renaming or unlinking them as
described above.
.PP
The
.B \-draft
switch tells
.B refile
to file the <mh\-dir>/draft.
.SH FILES
.fc ^ ~
.nf
.ta \w'%etcdir%/ExtraBigFileName 'u
^$HOME/\&.mh\(ruprofile~^The user profile
.fi
.SH "PROFILE COMPONENTS"
.fc ^ ~
.nf
.ta 2.4i
.ta \w'ExtraBigProfileName 'u
^Path:~^To determine the user's nmh directory
^Current\-Folder:~^To find the default current folder
^Folder\-Protect:~^To set mode when creating a new folder
^rmmproc:~^Program to delete the message
.fi
.SH "SEE ALSO"
folder(1), rmf(1), rmm(1)
.SH DEFAULTS
.nf
.RB ` "\-src\ +folder" "' defaults to the current folder"
.RB ` msgs "' defaults to cur"
.RB ` \-nolink '
.RB ` \-nounlink '
.RB ` \-nopreserve '
.fi
.SH CONTEXT
If
.B \-src
.I +folder
is given, it will become the current folder.
If neither
.B \-link
nor `all' is specified, the current message in the
source folder will be set to the last message specified; otherwise, the
current message won't be changed.
.PP
If the \*(lqPrevious\-Sequence\*(rq profile entry is set, in addition to defining
the named sequences from the source folder,
.B refile
will also define
those sequences for the destination folders. See
.B mh\-sequence (5)
for information concerning the previous sequence.
.SH BUGS
Since
.B refile
uses your
.I rmmproc
to delete the message,
the
.I rmmproc
must
.B NOT
call
.B refile
without specifying
.BR \-normmproc ,
or you will create an infinite loop.
|