]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/man/file.1
Replaced use of snprintf() with memcpy()/memmove().
[nmh] / docs / historical / mh-jun-1982 / man / file.1
1 .TH FILE 1 RAND
2 .SH NAME
3 file \- file message(s) in (an)other folder(s)
4 .SH SYNOPSIS
5 \fBfile \%[\fB\-\fRsrc\ +folder] \%[msgs] \%[\fB\-link\fR] \%[\fB\-preserve\fR] \%+folder\ ...
6 \%[\fB\-nolink\fR] \%[\fB\-nopreserve\fR]
7 \%[\fB\-file\fR\ file] \%[\fB\-nofile\fR] \%[\fB\-help\fR]
8 .SH DESCRIPTION
9 \fIFile\fR moves (\fImv\fR(1)) or links (\fIln\fR(1)) messages from a
10 source folder into one or more destination folders.
11 If you think
12 of a message as a sheet of paper, this operation is not
13 unlike filing the sheet of paper (or copies) in file cabinet
14 folders.
15 When a message is filed, it is linked into the
16 destination folder(s) if possible, and is copied otherwise.
17 As long
18 as the destination folders are all on the same file system, multiple filing
19 causes little storage overhead.
20 This facility provides a good way to cross-file or multiply-index
21 messages.
22 For example, if a message is received from Jones about
23 the ARPA Map Project, the command
24
25 file\0cur\0+jones\0+Map
26
27 would allow the message to be found in either of the two
28 folders `jones' or `Map'.
29
30 The option `\-file file' directs \fIfile\fR to use the specified
31 file as the source message to be filed, rather than a message from
32 a folder.
33
34 If a destination folder doesn't exist, \fIfile\fR will ask if you
35 want to create one.
36 A negative response will abort the file
37 operation.
38
39 `\-link' preserves the source folder copy of the message
40 (i.e., it does a \fIln\fR(1) rather than a \fImv\fR(1)), whereas,
41 `\-nolink' deletes the ``filed'' messages from the source
42 folder.
43 Normally, when a message is filed, it is assigned the
44 next highest number available in each of the destination folders.
45 Use of the `\-preserve' switch will override this message
46 ``renaming'', but name conflicts may occur, so
47 use this switch cautiously.
48 (See \fIpick\fR for more details on
49 message numbering.)
50
51 If `\-link' is not specified (or `\-nolink' is specified),
52 the filed messages will be removed (unlink(2)) from the
53 source folder.
54 .SH IMPORTANT NOTE
55 "File" already exists in many Unix systems as a program to check
56 the type of a file. If the Rand MH system has been installed,
57 that program will have been renamed to
58 .I filetype(1).
59 .SH FILES
60 .ta 2.4i
61 $HOME/\*.mh\(ruprofile The user profile
62 .SH PROFILE COMPONENTS
63 .br
64 Path: To determine the user's MH directory
65 .br
66 Current-Folder: To find the default current folder
67 .br
68 Folder\-Protect: To set mode when creating a new folder
69 .SH SEE ALSO
70 show(1), folder(1)
71 .SH DEFAULTS
72 `\-src +folder' defaults to the current folder
73 .br
74 `msgs' defaults to cur
75 .br
76 `\-nolink'
77 .br
78 `\-nopreserve'
79 .br
80 `\-nofile'
81 .SH CONTEXT
82 If `\-src +folder' is given, it will become the
83 current folder for future MH commands.
84 If neither `\-link' nor
85 `all' are specified, the current message in the source
86 folder will be set to the last message specified; otherwise, the
87 current message won't be changed.