Imported Upstream version 4.0.18
[platform/upstream/mtools.git] / mtools.info
1 This is mtools.info, produced by makeinfo version 4.13 from mtools.texi.
2
3 This manual is for Mtools (version 4.0.18, January 2013), which is a
4 collection of tools to allow Unix systems to manipulate MS-DOS files.
5
6    Copyright (C) 2007, 2009 Free Software Foundation, Inc.  Copyright
7 (C) 1996-2005,2007-2011,2013 Alain Knaff.
8
9      Permission is granted to copy, distribute and/or modify this
10      document under the terms of the GNU Free Documentation License,
11      Version 1.3 or any later version published by the Free Software
12      Foundation; with no Invariant Sections, with no Front-Cover Texts,
13      and with no Back-Cover Texts.  A copy of the license is included
14      in the section entitled "GNU Free Documentation License".
15
16 INFO-DIR-SECTION DOS
17 START-INFO-DIR-ENTRY
18 * Mtools: (mtools).        Mtools: utilities to access DOS disks in Unix.
19 END-INFO-DIR-ENTRY
20
21 \1f
22 File: mtools.info,  Node: Top,  Next: Location,  Prev: (dir),  Up: (dir)
23
24 Mtools doc
25 **********
26
27 This is mtools' documentation.
28
29 Introduction
30 ************
31
32 Mtools is a collection of tools to allow Unix systems to manipulate
33 MS-DOS files: read, write, and move around files on an MS-DOS file
34 system (typically a floppy disk).  Where reasonable, each program
35 attempts to emulate the MS-DOS equivalent command. However, unnecessary
36 restrictions and oddities of DOS are not emulated. For instance, it is
37 possible to move subdirectories from one subdirectory to another.
38
39    Mtools is sufficient to give access to MS-DOS file systems.  For
40 instance, commands such as `mdir a:' work on the `a:' floppy without
41 any preliminary mounting or initialization (assuming the default
42 `/etc/mtools.conf' works on your machine).  With mtools, one can change
43 floppies too without unmounting and mounting.
44
45    This manual is for Mtools (version 4.0.18, January 2013), which is a
46 collection of tools to allow Unix systems to manipulate MS-DOS files.
47
48    Copyright (C) 2007, 2009 Free Software Foundation, Inc.  Copyright
49 (C) 1996-2005,2007-2011,2013 Alain Knaff.
50
51      Permission is granted to copy, distribute and/or modify this
52      document under the terms of the GNU Free Documentation License,
53      Version 1.3 or any later version published by the Free Software
54      Foundation; with no Invariant Sections, with no Front-Cover Texts,
55      and with no Back-Cover Texts.  A copy of the license is included
56      in the section entitled "GNU Free Documentation License".
57
58 * Menu:
59
60 * Location::          Where to find mtools and early bug fixes
61 * Common features::   Common features of all mtools commands
62 * Configuration::     How to configure mtools for your environment
63 * Commands::          The available mtools commands
64 * Compiling mtools::  Architecture specific compilation flags
65 * Porting mtools::    Porting mtools to architectures which are not
66                       yet supported
67
68 * Command Index::     Command Index
69 * Variable Index::    Variable Index
70 * Concept Index::     Concept Index
71
72 \1f
73 File: mtools.info,  Node: Location,  Next: Common features,  Prev: Top,  Up: Top
74
75 1 Where to get mtools
76 *********************
77
78 Mtools can be found at the following places (and their mirrors):
79      http://ftp.gnu.org/gnu/mtools/mtools-4.0.18.tar.gz
80      http://mtools.linux.lu/mtools-4.0.18.tar.gz
81      ftp://www.tux.org/pub/knaff/mtools/mtools-4.0.18.tar.gz
82      ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/mtools-4.0.18.tar.gz
83
84    Before reporting a bug, make sure that it has not yet been fixed in
85 the Alpha patches which can be found at:
86      http://ftp.gnu.org/gnu/mtools/
87      http://mtools.linux.lu/
88      ftp://www.tux.org/pub/knaff/mtools
89
90    These patches are named `mtools-'VERSION`-'DDMM`.taz', where version
91 stands for the base version, DD for the day and MM for the month. Due
92 to a lack of space, I usually leave only the most recent patch.
93
94    There is an mtools mailing list at mtools @ tux.org .  Please send
95 all bug reports to this list.  You may subscribe to the list by sending
96 a message with 'subscribe mtools @ tux.org' in its body to majordomo @
97 tux.org . (N.B. Please remove the spaces around the "@" both times. I
98 left them there in order to fool spambots.)  Announcements of new
99 mtools versions will also be sent to the list, in addition to the Linux
100 announce newsgroups.  The mailing list is archived at
101 http://lists.gnu.org/pipermail/info-mtools/
102
103 \1f
104 File: mtools.info,  Node: Common features,  Next: Configuration,  Prev: Location,  Up: Top
105
106 2 Common features of all mtools commands
107 ****************************************
108
109 * Menu:
110
111 * arguments::              What the command line parameters of mtools
112                            mean
113 * drive letters::          Which drives are defined by default
114 * directory::              Current working directory
115 * long names::             VFAT-style long filenames
116 * name clashes::           Name clash handling, and associated command
117                            line options
118 * case sensitivity::       Case sensitivity
119 * high capacity formats::  How to fit more data on your floppies
120 * exit codes::             Exit codes
121 * bugs::                   Happens to everybody
122
123 \1f
124 File: mtools.info,  Node: arguments,  Next: drive letters,  Prev: Common features,  Up: Common features
125
126 2.1 Options and filenames
127 =========================
128
129 MS-DOS filenames are composed of a drive letter followed by a colon, a
130 subdirectory, and a filename. Only the filename part is mandatory, the
131 drive letter and the subdirectory are optional. Filenames without a
132 drive letter refer to Unix files. Subdirectory names can use either the
133 '`/'' or '`\'' separator.  The use of the '`\'' separator or wildcards
134 requires the names to be enclosed in quotes to protect them from the
135 shell. However, wildcards in Unix filenames should not be enclosed in
136 quotes, because here we *want* the shell to expand them.
137
138    The regular expression "pattern matching" routines follow the
139 Unix-style rules.  For example, ``*'' matches all MS-DOS files in lieu
140 of ``*.*''.  The archive, hidden, read-only and system attribute bits
141 are ignored during pattern matching.
142
143    All options use the `-' (minus) as their first character, not `/' as
144 you'd expect in MS-DOS.
145
146    Most mtools commands allow multiple filename parameters, which
147 doesn't follow MS-DOS conventions, but which is more user-friendly.
148
149    Most mtools commands allow options that instruct them how to handle
150 file name clashes. *Note name clashes::, for more details on these. All
151 commands accept the `-V' flags which prints the version, and most
152 accept the `-v' flag, which switches on verbose mode. In verbose mode,
153 these commands print out the name of the MS-DOS files upon which they
154 act, unless stated otherwise. *Note Commands::, for a description of
155 the options which are specific to each command.
156
157 \1f
158 File: mtools.info,  Node: drive letters,  Next: directory,  Prev: arguments,  Up: Common features
159
160 2.2 Drive letters
161 =================
162
163 The meaning of the drive letters depends on the target architectures.
164 However, on most target architectures, drive A is the first floppy
165 drive, drive B is the second floppy drive (if available), drive J is a
166 Jaz drive (if available), and drive Z is a Zip drive (if available).  On
167 those systems where the device name is derived from the SCSI id, the Jaz
168 drive is assumed to be at SCSI target 4, and the Zip at SCSI target 5
169 (factory default settings).  On Linux, both drives are assumed to be the
170 second drive on the SCSI bus (/dev/sdb). The default settings can be
171 changes using a configuration file (*note Configuration::).
172
173    The drive letter : (colon) has a special meaning. It is used to
174 access image files which are directly specified on the command line
175 using the `-i' options.
176
177    Example:
178       mcopy -i my-image-file.bin ::file1 ::file2 .
179
180    This copies `file1' and `file2' from the image file
181 (`my-image-file.bin') to the `/tmp' directory.
182
183    You can also supply an offset within the image file by including
184 `@@'OFFSET into the file name.
185
186    Example:
187       mcopy -i my-image-file.bin@@1M ::file1 ::file2 .
188
189    This looks for the image at the offset of 1M in the file, rather than
190 at its beginning.
191
192 \1f
193 File: mtools.info,  Node: directory,  Next: long names,  Prev: drive letters,  Up: Common features
194
195 2.3 Current working directory
196 =============================
197
198 The `mcd' command (*note mcd::) is used to establish the device and the
199 current working directory (relative to the MS-DOS file system),
200 otherwise the default is assumed to be `A:/'. However, unlike MS-DOS,
201 there is only one working directory for all drives, and not one per
202 drive.
203
204 \1f
205 File: mtools.info,  Node: long names,  Next: name clashes,  Prev: directory,  Up: Common features
206
207 2.4 VFAT-style long file names
208 ==============================
209
210 This version of mtools supports VFAT style long filenames. If a Unix
211 filename is too long to fit in a short DOS name, it is stored as a VFAT
212 long name, and a companion short name is generated. This short name is
213 what you see when you examine the disk with a pre-7.0 version of DOS.
214 The following table shows some examples of short names:
215
216      Long name       MS-DOS name     Reason for the change
217      ---------       ----------      ---------------------
218      thisisatest     THISIS~1        filename too long
219      alain.knaff     ALAIN~1.KNA     extension too long
220      prn.txt         PRN~1.TXT       PRN is a device name
221      .abc            ABC~1           null filename
222      hot+cold        HOT_CO~1        illegal character
223
224    As you see, the following transformations happen to derive a short
225 name:
226    * Illegal characters are replaced by underscores. The illegal
227      characters are `;+=[]',\"*\\<>/?:|'.
228
229    * Extra dots, which cannot be interpreted as a main name/extension
230      separator are removed
231
232    * A `~'N number is generated,
233
234    * The name is shortened so as to fit in the 8+3 limitation
235
236    The initial Unix-style file name (whether long or short) is also
237 called the "primary" name, and the derived short name is also called the
238 "secondary" name.
239
240    Example:
241       mcopy /etc/motd a:Reallylongname
242     Mtools creates a VFAT entry for Reallylongname, and uses REALLYLO as
243 a short name. Reallylongname is the primary name, and REALLYLO is the
244 secondary name.
245       mcopy /etc/motd a:motd
246     Motd fits into the DOS filename limits. Mtools doesn't need to
247 derivate another name. Motd is the primary name, and there is no
248 secondary name.
249
250    In a nutshell: The primary name is the long name, if one exists, or
251 the short name if there is no long name.
252
253    Although VFAT is much more flexible than FAT, there are still names
254 that are not acceptable, even in VFAT. There are still some illegal
255 characters left (`\"*\\<>/?:|'), and device names are still reserved.
256
257      Unix name       Long name       Reason for the change
258      ---------       ----------      ---------------------
259      prn             prn-1           PRN is a device name
260      ab:c            ab_c-1          illegal character
261
262    As you see, the following transformations happen if a long name is
263 illegal:
264    * Illegal characters are replaces by underscores,
265
266    * A `-'N number is generated,
267
268 \1f
269 File: mtools.info,  Node: name clashes,  Next: case sensitivity,  Prev: long names,  Up: Common features
270
271 2.5 Name clashes
272 ================
273
274 When writing a file to disk, its long name or short name may collide
275 with an already existing file or directory. This may happen for all
276 commands which create new directory entries, such as `mcopy', `mmd',
277 `mren', `mmove'. When a name clash happens, mtools asks you what it
278 should do. It offers several choices:
279
280 `overwrite'
281      Overwrites the existing file. It is not possible to overwrite a
282      directory with a file.
283
284 `rename'
285      Renames the newly created file. Mtools prompts for the new filename
286
287 `autorename'
288      Renames the newly created file. Mtools chooses a name by itself,
289      without prompting
290
291 `skip'
292      Gives up on this file, and moves on to the next (if any)
293
294    To chose one of these actions, type its first letter at the prompt.
295 If you use a lower case letter, the action only applies for this file
296 only, if you use an upper case letter, the action applies to all files,
297 and you won't be prompted again.
298
299    You may also chose actions (for all files) on the command line, when
300 invoking mtools:
301
302 `-D o'
303      Overwrites primary names by default.
304
305 `-D O'
306      Overwrites secondary names by default.
307
308 `-D r'
309      Renames primary name by default.
310
311 `-D R'
312      Renames secondary name by default.
313
314 `-D a'
315      Autorenames primary name by default.
316
317 `-D A'
318      Autorenames secondary name by default.
319
320 `-D s'
321      Skip primary name by default.
322
323 `-D S'
324      Skip secondary name by default.
325
326 `-D m'
327      Ask user what to do with primary name.
328
329 `-D M'
330      Ask user what to do with secondary name.
331
332    Note that for command line switches lower/upper differentiates
333 between primary/secondary name whereas for interactive choices,
334 lower/upper differentiates between just-this-time/always.
335
336    The primary name is the name as displayed in Windows 95 or Windows
337 NT: i.e. the long name if it exists, and the short name otherwise.  The
338 secondary name is the "hidden" name, i.e. the short name if a long name
339 exists.
340
341    By default, the user is prompted if the primary name clashes, and the
342 secondary name is autorenamed.
343
344    If a name clash occurs in a Unix directory, mtools only asks whether
345 to overwrite the file, or to skip it.
346
347 \1f
348 File: mtools.info,  Node: case sensitivity,  Next: high capacity formats,  Prev: name clashes,  Up: Common features
349
350 2.6 Case sensitivity of the VFAT file system
351 ============================================
352
353 The VFAT file system is able to remember the case of the filenames.
354 However, filenames which differ only in case are not allowed to coexist
355 in the same directory. For example if you store a file called
356 LongFileName on a VFAT file system, mdir shows this file as
357 LongFileName, and not as Longfilename. However, if you then try to add
358 LongFilename to the same directory, it is refused, because case is
359 ignored for clash checks.
360
361    The VFAT file system allows to store the case of a filename in the
362 attribute byte, if all letters of the filename are the same case, and if
363 all letters of the extension are the same case too. Mtools uses this
364 information when displaying the files, and also to generate the Unix
365 filename when mcopying to a Unix directory. This may have unexpected
366 results when applied to files written using an pre-7.0 version of DOS:
367 Indeed, the old style filenames map to all upper case. This is different
368 from the behavior of the old version of mtools which used to generate
369 lower case Unix filenames.
370
371 \1f
372 File: mtools.info,  Node: high capacity formats,  Next: exit codes,  Prev: case sensitivity,  Up: Common features
373
374 2.7 high capacity formats
375 =========================
376
377 Mtools supports a number of formats which allow to store more data on
378 disk as usual. Due to different operating system abilities, these
379 formats are not supported on all operating systems. Mtools recognizes
380 these formats transparently where supported.
381
382    In order to format these disks, you need to use an operating system
383 specific tool. For Linux, suitable floppy tools can be found in the
384 `fdutils' package at the following locations~:
385      `ftp://www.tux.org/pub/knaff/fdutils/'.
386      `ftp://ibiblio.unc.edu/pub/Linux/utils/disk-management/fdutils-*'
387
388    See the manual pages included in that package for further detail: Use
389 `superformat' to format all formats except XDF, and use `xdfcopy' to
390 format XDF.
391
392 * Menu:
393
394 * more sectors::      Putting more sectors per track on the disk
395 * bigger sectors::    Use bigger sectors to save header space
396 * 2m::                Use a standard first track
397 * XDF::               OS/2's eXtended density format
398
399 \1f
400 File: mtools.info,  Node: more sectors,  Next: bigger sectors,  Prev: high capacity formats,  Up: high capacity formats
401
402 2.7.1 More sectors
403 ------------------
404
405 The oldest method of fitting more data on a disk is to use more sectors
406 and more cylinders. Although the standard format uses 80 cylinders and
407 18 sectors (on a 3 1/2 high density disk), it is possible to use up to
408 83 cylinders (on most drives) and up to 21 sectors. This method allows
409 to store up to 1743K on a 3 1/2 HD disk. However, 21 sector disks are
410 twice as slow as the standard 18 sector disks because the sectors are
411 packed so close together that we need to interleave them. This problem
412 doesn't exist for 20 sector formats.
413
414    These formats are supported by numerous DOS shareware utilities such
415 as `fdformat' and `vgacopy'. In his infinite hubris, Bill Gate$
416 believed that he invented this, and called it `DMF disks', or `Windows
417 formatted disks'. But in reality, it has already existed years before!
418 Mtools supports these formats on Linux, on SunOS and on the DELL Unix
419 PC.
420
421 \1f
422 File: mtools.info,  Node: bigger sectors,  Next: 2m,  Prev: more sectors,  Up: high capacity formats
423
424 2.7.2 Bigger sectors
425 --------------------
426
427 By using bigger sectors it is possible to go beyond the capacity which
428 can be obtained by the standard 512-byte sectors. This is because of the
429 sector header. The sector header has the same size, regardless of how
430 many data bytes are in the sector. Thus, we save some space by using
431 _fewer_, but bigger sectors. For example, 1 sector of 4K only takes up
432 header space once, whereas 8 sectors of 512 bytes have also 8 headers,
433 for the same amount of useful data.
434
435    This method allows to store up to 1992K on a 3 1/2 HD disk.
436
437    Mtools supports these formats only on Linux.
438
439 \1f
440 File: mtools.info,  Node: 2m,  Next: XDF,  Prev: bigger sectors,  Up: high capacity formats
441
442 2.7.3 2m
443 --------
444
445 The 2m format was originally invented by Ciriaco Garcia de Celis. It
446 also uses bigger sectors than usual in order to fit more data on the
447 disk.  However, it uses the standard format (18 sectors of 512 bytes
448 each) on the first cylinder, in order to make these disks easier to
449 handle by DOS. Indeed this method allows to have a standard sized boot
450 sector, which contains a description of how the rest of the disk should
451 be read.
452
453    However, the drawback of this is that the first cylinder can hold
454 less data than the others. Unfortunately, DOS can only handle disks
455 where each track contains the same amount of data. Thus 2m hides the
456 fact that the first track contains less data by using a "shadow FAT".
457 (Usually, DOS stores the FAT in two identical copies, for additional
458 safety.  XDF stores only one copy, but tells DOS that it stores two.
459 Thus the space that would be taken up by the second FAT copy is saved.)
460 This also means that you should *never use a 2m disk to store anything
461 else than a DOS file system*.
462
463    Mtools supports these formats only on Linux.
464
465 \1f
466 File: mtools.info,  Node: XDF,  Prev: 2m,  Up: high capacity formats
467
468 2.7.4 XDF
469 ---------
470
471 XDF is a high capacity format used by OS/2. It can hold 1840 K per
472 disk. That's lower than the best 2m formats, but its main advantage is
473 that it is fast: 600 milliseconds per track. That's faster than the 21
474 sector format, and almost as fast as the standard 18 sector format. In
475 order to access these disks, make sure mtools has been compiled with XDF
476 support, and set the `use_xdf' variable for the drive in the
477 configuration file. *Note Compiling mtools::, and *note miscellaneous
478 variables::, for details on how to do this. Fast XDF access is only
479 available for Linux kernels which are more recent than 1.1.34.
480
481    Mtools supports this format only on Linux.
482
483    *Caution / Attention distributors*: If mtools is compiled on a Linux
484 kernel more recent than 1.3.34, it won't run on an older kernel.
485 However, if it has been compiled on an older kernel, it still runs on a
486 newer kernel, except that XDF access is slower. It is recommended that
487 distribution authors only include mtools binaries compiled on kernels
488 older than 1.3.34 until 2.0 comes out. When 2.0 will be out, mtools
489 binaries compiled on newer kernels may (and should) be distributed.
490 Mtools binaries compiled on kernels older than 1.3.34 won't run on any
491 2.1 kernel or later.
492
493 \1f
494 File: mtools.info,  Node: exit codes,  Next: bugs,  Prev: high capacity formats,  Up: Common features
495
496 2.8 Exit codes
497 ==============
498
499 All the Mtools commands return 0 on success, 1 on utter failure, or 2
500 on partial failure.  All the Mtools commands perform a few sanity
501 checks before going ahead, to make sure that the disk is indeed an
502 MS-DOS disk (as opposed to, say an ext2 or MINIX disk). These checks
503 may reject partially corrupted disks, which might otherwise still be
504 readable. To avoid these checks, set the MTOOLS_SKIP_CHECK
505 environmental variable or the corresponding configuration file variable
506 (*note global variables::)
507
508 \1f
509 File: mtools.info,  Node: bugs,  Prev: exit codes,  Up: Common features
510
511 2.9 Bugs
512 ========
513
514 An unfortunate side effect of not guessing the proper device (when
515 multiple disk capacities are supported) is an occasional error message
516 from the device driver.  These can be safely ignored.
517
518    The fat checking code chokes on 1.72 Mb disks mformatted with
519 pre-2.0.7 mtools. Set the environmental variable
520 MTOOLS_FAT_COMPATIBILITY (or the corresponding configuration file
521 variable, *note global variables::) to bypass the fat checking.
522
523 \1f
524 File: mtools.info,  Node: Configuration,  Next: Commands,  Prev: Common features,  Up: Top
525
526 3 How to configure mtools for your environment
527 **********************************************
528
529 3.1 Description
530 ===============
531
532 This sections explains the syntax of the configurations files for
533 mtools. The configuration files are called `/etc/mtools.conf' and
534 `~/.mtoolsrc'. If the environmental variable `MTOOLSRC' is set, its
535 contents is used as the filename for a third configuration file. These
536 configuration files describe the following items:
537
538    * Global configuration flags and variables
539
540    * Per drive flags and variables
541
542 * Menu:
543
544 * configuration file location::  Where mtools looks for its configuration files
545 * general syntax::        The layout of the configuration files
546 * default values::        Why you don't need a configuration file in most cases
547 * global variables::      Variables that are independent of the drive
548 * per drive variables::   Variables that are specific to a given drive
549 * parsing order::         Location of configuration files and parsing order
550 * old style configuration::      Backwards compatibility
551
552 \1f
553 File: mtools.info,  Node: configuration file location,  Next: general syntax,  Prev: Configuration,  Up: Configuration
554
555 3.2 Location of the configuration files
556 =======================================
557
558 `/etc/mtools.conf' is the system-wide configuration file, and
559 `~/.mtoolsrc' is the user's private configuration file.
560
561    On some systems, the system-wide configuration file is called
562 `/etc/default/mtools.conf' instead.
563
564 \1f
565 File: mtools.info,  Node: general syntax,  Next: default values,  Prev: configuration file location,  Up: Configuration
566
567 3.2.1 General configuration file syntax
568 ---------------------------------------
569
570 The configuration files is made up of sections. Each section starts
571 with a keyword identifying the section followed by a colon.  Then
572 follow variable assignments and flags. Variable assignments take the
573 following form:
574      name=value
575    Flags are lone keywords without an equal sign and value following
576 them.  A section either ends at the end of the file or where the next
577 section begins.
578
579    Lines starting with a hash (`#') are comments. Newline characters
580 are equivalent to whitespace (except where ending a comment). The
581 configuration file is case insensitive, except for item enclosed in
582 quotes (such as filenames).
583
584 \1f
585 File: mtools.info,  Node: default values,  Next: global variables,  Prev: general syntax,  Up: Configuration
586
587 3.3 Default values
588 ==================
589
590 For most platforms, mtools contains reasonable compiled-in defaults for
591 physical floppy drives.  Thus, you usually don't need to bother with the
592 configuration file, if all you want to do with mtools is to access your
593 floppy drives. On the other hand, the configuration file is needed if
594 you also want to use mtools to access your hard disk partitions and
595 DOSEMU image files.
596
597 \1f
598 File: mtools.info,  Node: global variables,  Next: per drive variables,  Prev: default values,  Up: Configuration
599
600 3.4 Global variables
601 ====================
602
603 Global flags may be set to 1 or to 0.
604
605    The following global flags are recognized:
606
607 `MTOOLS_SKIP_CHECK'
608      If this is set to 1, mtools skips most of its sanity checks. This
609      is needed to read some Atari disks which have been made with the
610      earlier ROMs, and which would not be recognized otherwise.
611
612 `MTOOLS_FAT_COMPATIBILITY'
613      If this is set to 1, mtools skips the fat size checks. Some disks
614      have a bigger FAT than they really need to. These are rejected if
615      this option is not set.
616
617 `MTOOLS_LOWER_CASE'
618      If this is set to 1, mtools displays all-upper-case short
619      filenames as lowercase. This has been done to allow a behavior
620      which is consistent with older versions of mtools which didn't
621      know about the case bits.
622
623 `MTOOLS_NO_VFAT'
624      If this is set to 1, mtools won't generate VFAT entries for
625      filenames which are mixed-case, but otherwise legal dos filenames.
626      This is useful when working with DOS versions which can't grok
627      VFAT long names, such as FreeDOS.
628
629 `MTOOLS_DOTTED_DIR'
630      In a wide directory, prints the short name with a dot instead of
631      spaces separating the basename and the extension.
632
633 `MTOOLS_NAME_NUMERIC_TAIL'
634      If this is set to one (default), generate numeric tails for all
635      long names (~1).  If set to zero, only generate numeric tails if
636      otherwise a clash would have happened.
637
638 `MTOOLS_TWENTY_FOUR_HOUR_CLOCK'
639      If 1, uses the European notation for times (twenty four hour
640      clock), else uses the UK/US notation (am/pm)
641
642    Example: Inserting the following line into your configuration file
643 instructs mtools to skip the sanity checks:
644        MTOOLS_SKIP_CHECK=1
645
646    Global variables may also be set via the environment:
647        export MTOOLS_SKIP_CHECK=1
648
649    Global string variables may be set to any value:
650 `MTOOLS_DATE_STRING'
651      The format used for printing dates of files.  By default, is
652      dd-mm-yyyy.
653
654 \1f
655 File: mtools.info,  Node: per drive variables,  Next: parsing order,  Prev: global variables,  Up: Configuration
656
657 3.5 Per drive flags and variables
658 =================================
659
660 * Menu:
661
662 * general information::   What a drive description looks like
663 * location information::  Where is the drive data physically stored
664 * geometry description::  Describes the physical characteristics of
665                           the media
666 * open flags::            Flags passed to the open system call when the
667                           device is opened
668 * miscellaneous variables::        Variables which don't fit in either category
669 * miscellaneous flags::           Switch variables, which can be enabled or disabled
670 * multiple descriptions:: How to supply several descriptions for a
671                           drive, to be tried one after the other.
672
673 \1f
674 File: mtools.info,  Node: general information,  Next: location information,  Prev: per drive variables,  Up: per drive variables
675
676 3.5.1 General information
677 -------------------------
678
679 Per drive flags and values may be described in a drive section. A drive
680 section starts with `drive' "DRIVELETTER" :
681
682    Then follow variable-value pairs and flags.
683
684    This is a sample drive description:
685        drive a:
686          file="/dev/fd0" use_xdf=1
687
688 \1f
689 File: mtools.info,  Node: location information,  Next: geometry description,  Prev: general information,  Up: per drive variables
690
691 3.5.2 Location information
692 --------------------------
693
694 For each drive, you need to describe where its data is physically
695 stored (image file, physical device, partition, offset).
696
697 `file'
698      The name of the file or device holding the disk image. This is
699      mandatory. The file name should be enclosed in quotes.
700
701 `partition'
702      Tells mtools to treat the drive as a partitioned device, and to
703      use the given partition. Only primary partitions are accessible
704      using this method, and they are numbered from 1 to 4. For logical
705      partitions, use the more general `offset' variable. The
706      `partition' variable is intended for removable media such as
707      Syquest disks, ZIP drives, and magneto-optical disks. Although
708      traditional DOS sees Syquest disks and magneto-optical disks as
709      `giant floppy disks' which are unpartitioned, OS/2 and Windows NT
710      treat them like hard disks, i.e. partitioned devices. The
711      `partition' flag is also useful DOSEMU hdimages. It is not
712      recommended for hard disks for which direct access to partitions
713      is available through mounting.
714
715 `offset'
716      Describes where in the file the MS-DOS file system starts. This is
717      useful for logical partitions in DOSEMU hdimages, and for ATARI
718      ram disks. By default, this is zero, meaning that the file system
719      starts right at the beginning of the device or file.
720
721 \1f
722 File: mtools.info,  Node: geometry description,  Next: open flags,  Prev: location information,  Up: per drive variables
723
724 3.5.3 Disk Geometry Configuration
725 ---------------------------------
726
727 Geometry information describes the physical characteristics about the
728 disk. Its has three purposes:
729
730 formatting
731      The geometry information is written into the boot sector of the
732      newly made disk. However, you may also describe the geometry
733      information on the command line. *Note mformat::, for details.
734
735 filtering
736      On some Unixes there are device nodes which only support one
737      physical geometry. For instance, you might need a different node
738      to access a disk as high density or as low density. The geometry
739      is compared to the actual geometry stored on the boot sector to
740      make sure that this device node is able to correctly read the
741      disk. If the geometry doesn't match, this drive entry fails, and
742      the next drive entry bearing the same drive letter is tried. *Note
743      multiple descriptions::, for more details on supplying several
744      descriptions for one drive letter.
745
746      If no geometry information is supplied in the configuration file,
747      all disks are accepted. On Linux (and on SPARC) there exist device
748      nodes with configurable geometry (`/dev/fd0', `/dev/fd1' etc), and
749      thus filtering is not needed (and ignored) for disk drives.
750      (Mtools still does do filtering on plain files (disk images) in
751      Linux: this is mainly intended for test purposes, as I don't have
752      access to a Unix which would actually need filtering).
753
754      If you do not need filtering, but want still a default geometry for
755      mformatting, you may switch off filtering using the `mformat_only'
756      flag.
757
758      If you want filtering, you should supply the `filter' flag.  If you
759      supply a geometry, you must supply one of both flags.
760
761 initial geometry
762      On devices that support it (usually floppy devices), the geometry
763      information is also used to set the initial geometry. This initial
764      geometry is applied while reading the boot sector, which contains
765      the real geometry.  If no geometry information is supplied in the
766      configuration file, or if the `mformat_only' flag is supplied, no
767      initial configuration is done.
768
769      On Linux, initial geometry is not really needed, as the
770      configurable devices are able to auto-detect the disk type
771      accurately enough (for most common formats) to read the boot
772      sector.
773
774    Wrong geometry information may lead to very bizarre errors. That's
775 why I strongly recommend that you add the `mformat_only' flag to your
776 drive description, unless you really need filtering or initial geometry.
777
778    The following geometry related variables are available:
779
780 `cylinders'
781 `tracks'
782      The number of cylinders. (`cylinders' is the preferred form,
783      `tracks' is considered obsolete)
784
785 `heads'
786      The number of heads (sides).
787
788 `sectors'
789      The number of sectors per track.
790
791    Example: the following drive section describes a 1.44M drive:
792
793        drive a:
794            file="/dev/fd0H1440"
795            fat_bits=12
796            cylinders=80 heads=2 sectors=18
797            mformat_only
798
799    The following shorthand geometry descriptions are available:
800
801 `1.44m'
802      high density 3 1/2 disk. Equivalent to: `fat_bits=12 cylinders=80
803      heads=2 sectors=18'
804
805 `1.2m'
806      high density 5 1/4 disk. Equivalent to: `fat_bits=12 cylinders=80
807      heads=2 sectors=15'
808
809 `720k'
810      double density 3 1/2 disk. Equivalent to: `fat_bits=12
811      cylinders=80 heads=2 sectors=9'
812
813 `360k'
814      double density 5 1/4 disk. Equivalent to: `fat_bits=12
815      cylinders=40 heads=2 sectors=9'
816
817    The shorthand format descriptions may be amended. For example, `360k
818 sectors=8' describes a 320k disk and is equivalent to: `fat_bits=12
819 cylinders=40 heads=2 sectors=8'
820
821 \1f
822 File: mtools.info,  Node: open flags,  Next: miscellaneous variables,  Prev: geometry description,  Up: per drive variables
823
824 3.5.4 Open Flags
825 ----------------
826
827 Moreover, the following flags are available:
828
829 `sync'
830      All i/o operations are done synchronously
831
832 `nodelay'
833      The device or file is opened with the O_NDELAY flag. This is
834      needed on some non-Linux architectures.
835
836 `exclusive'
837      The device or file is opened with the O_EXCL flag. On Linux, this
838      ensures exclusive access to the floppy drive. On most other
839      architectures, and for plain files it has no effect at all.
840
841 \1f
842 File: mtools.info,  Node: miscellaneous variables,  Next: miscellaneous flags,  Prev: open flags,  Up: per drive variables
843
844 3.5.5 General Purpose Drive Variables
845 -------------------------------------
846
847 The following general purpose drive variables are available.  Depending
848 to their type, these variables can be set to a string (precmd) or an
849 integer (all others)
850
851 `fat_bits'
852      The number of FAT bits. This may be 12 or 16. This is very rarely
853      needed, as it can almost always be deduced from information in the
854      boot sector. On the contrary, describing the number of fat bits may
855      actually be harmful if you get it wrong. You should only use it if
856      mtools gets the auto-detected number of fat bits wrong, or if you
857      want to mformat a disk with a weird number of fat bits.
858
859 `codepage'
860      Describes the DOS code page used for short filenames. This is a
861      number between 1 and 999. By default, code page 850 is used. The
862      reason for this is because this code page contains most of the
863      characters that are also available in ISO-Latin-1. You may also
864      specify a global code page for all drives by using the global
865      `default_codepage' parameter (outside of any drive description).
866      This parameters exists starting at version 4.0.0
867
868 `precmd'
869      On some variants of Solaris, it is necessary to call 'volcheck -v'
870      before opening a floppy device, in order for the system to notice
871      that there is indeed a disk in the drive. `precmd="volcheck -v"'
872      in the drive clause establishes the desired behavior.
873
874 `blocksize'
875      This parameter represents a default block size to be always used
876      on this device.  All I/O is done with multiples of this block size,
877      independently of the sector size registered in the file system's
878      boot sector.  This is useful for character devices whose sector
879      size is not 512, such as for example CD-ROM drives on Solaris.
880
881
882    Only the `file' variable is mandatory. The other parameters may be
883 left out. In that case a default value or an auto-detected value is
884 used.
885
886 \1f
887 File: mtools.info,  Node: miscellaneous flags,  Next: multiple descriptions,  Prev: miscellaneous variables,  Up: per drive variables
888
889 3.5.6 General Purpose Drive Flags
890 ---------------------------------
891
892 A flag can either be set to 1 (enabled) or 0 (disabled). If the value is
893 omitted, it is enabled.  For example, `scsi' is equivalent to `scsi=1'
894
895 `nolock'
896      Instruct mtools to not use locking on this drive.  This is needed
897      on systems with buggy locking semantics.  However, enabling this
898      makes operation less safe in cases where several users may access
899      the same drive at the same time.
900
901 `scsi'
902      When set to 1, this option tells mtools to use raw SCSI I/O
903      instead of the standard read/write calls to access the device.
904      Currently, this is supported on HP-UX, Solaris and SunOS.  This is
905      needed because on some architectures, such as SunOS or Solaris, PC
906      media can't be accessed using the `read' and `write' system calls,
907      because the OS expects them to contain a Sun specific "disk label".
908
909      As raw SCSI access always uses the whole device, you need to
910      specify the "partition" flag in addition
911
912      On some architectures, such as Solaris, mtools needs root
913      privileges to be able to use the `scsi' option.  Thus mtools
914      should be installed setuid root on Solaris if you want to access
915      Zip/Jaz drives.  Thus, if the `scsi' flag is given, `privileged'
916      is automatically implied, unless explicitly disabled by
917      `privileged=0'
918
919      Mtools uses its root privileges to open the device, and to issue
920      the actual SCSI I/O calls.  Moreover, root privileges are only
921      used for drives described in a system-wide configuration file such
922      as `/etc/mtools.conf', and not for those described in
923      `~/.mtoolsrc' or `$MTOOLSRC'.
924
925 `privileged'
926      When set to 1, this instructs mtools to use its setuid and setgid
927      privileges for opening the given drive.  This option is only valid
928      for drives described in the system-wide configuration files (such
929      as `/etc/mtools.conf', not `~/.mtoolsrc' or `$MTOOLSRC').
930      Obviously, this option is also a no op if mtools is not installed
931      setuid or setgid.  This option is implied by 'scsi=1', but again
932      only for drives defined in system-wide configuration files.
933      Privileged may also be set explicitly to 0, in order to tell
934      mtools not to use its privileges for a given drive even if
935      `scsi=1' is set.
936
937      Mtools only needs to be installed setuid if you use the
938      `privileged' or `scsi' drive variables.  If you do not use these
939      options, mtools works perfectly well even when not installed
940      setuid root.
941
942 `vold'
943      Instructs mtools to interpret the device name as a vold identifier
944      rather than as a filename.  The vold identifier is translated into
945      a real filename using the `media_findname()' and
946      `media_oldaliases()' functions of the `volmgt' library.  This flag
947      is only available if you configured mtools with the
948      `--enable-new-vold' option before compilation.
949
950 `swap'
951      Consider the media as a word-swapped Atari disk.
952
953 `use_xdf'
954      If this is set to a non-zero value, mtools also tries to access
955      this disk as an XDF disk. XDF is a high capacity format used by
956      OS/2. This is off by default. *Note XDF::, for more details.
957
958 `mformat_only'
959      Tells mtools to use the geometry for this drive only for
960      mformatting and not for filtering.
961
962 `filter'
963      Tells mtools to use the geometry for this drive both for
964      mformatting and filtering.
965
966 `remote'
967      Tells mtools to connect to floppyd (*note floppyd::).
968
969 \1f
970 File: mtools.info,  Node: multiple descriptions,  Prev: miscellaneous flags,  Up: per drive variables
971
972 3.5.7 Supplying multiple descriptions for a drive
973 -------------------------------------------------
974
975 It is possible to supply multiple descriptions for a drive. In that
976 case, the descriptions are tried in order until one is found that fits.
977 Descriptions may fail for several reasons:
978
979   1. because the geometry is not appropriate,
980
981   2. because there is no disk in the drive,
982
983   3. or because of other problems.
984
985    Multiple definitions are useful when using physical devices which are
986 only able to support one single disk geometry.  Example:
987        drive a: file="/dev/fd0H1440" 1.44m
988        drive a: file="/dev/fd0H720" 720k
989
990    This instructs mtools to use /dev/fd0H1440 for 1.44m (high density)
991 disks and /dev/fd0H720 for 720k (double density) disks. On Linux, this
992 feature is not really needed, as the /dev/fd0 device is able to handle
993 any geometry.
994
995    You may also use multiple drive descriptions to access both of your
996 physical drives through one drive letter:
997
998        drive z: file="/dev/fd0"
999        drive z: file="/dev/fd1"
1000
1001    With this description, `mdir z:' accesses your first physical drive
1002 if it contains a disk. If the first drive doesn't contain a disk,
1003 mtools checks the second drive.
1004
1005    When using multiple configuration files, drive descriptions in the
1006 files parsed last override descriptions for the same drive in earlier
1007 files. In order to avoid this, use the `drive+' or `+drive' keywords
1008 instead of `drive'. The first adds a description to the end of the list
1009 (i.e. it will be tried last), and the first adds it to the start of the
1010 list.
1011
1012 \1f
1013 File: mtools.info,  Node: parsing order,  Next: old style configuration,  Prev: per drive variables,  Up: Configuration
1014
1015 3.6 Location of configuration files and parsing order
1016 =====================================================
1017
1018 The configuration files are parsed in the following order:
1019   1. compiled-in defaults
1020
1021   2. `/etc/mtools.conf'
1022
1023   3. `~/.mtoolsrc'.
1024
1025   4. `$MTOOLSRC' (file pointed by the `MTOOLSRC' environmental variable)
1026
1027    Options described in the later files override those described in the
1028 earlier files. Drives defined in earlier files persist if they are not
1029 overridden in the later files. For instance, drives A and B may be
1030 defined in `/etc/mtools.conf' and drives C and D may be defined in
1031 `~/.mtoolsrc' However, if `~/.mtoolsrc' also defines drive A, this new
1032 description would override the description of drive A in
1033 `/etc/mtools.conf' instead of adding to it. If you want to add a new
1034 description to a drive already described in an earlier file, you need
1035 to use either the `+drive' or `drive+' keyword.
1036
1037 \1f
1038 File: mtools.info,  Node: old style configuration,  Prev: parsing order,  Up: Configuration
1039
1040 3.7 Backwards compatibility with old configuration file syntax
1041 ==============================================================
1042
1043 The syntax described herein is new for version `mtools-3.0'. The old
1044 line-oriented syntax is still supported. Each line beginning with a
1045 single letter is considered to be a drive description using the old
1046 syntax. Old style and new style drive sections may be mixed within the
1047 same configuration file, in order to make upgrading easier. Support for
1048 the old syntax will be phased out eventually, and in order to discourage
1049 its use, I purposefully omit its description here.
1050
1051 \1f
1052 File: mtools.info,  Node: Commands,  Next: Compiling mtools,  Prev: Configuration,  Up: Top
1053
1054 4 Command list
1055 **************
1056
1057 This section describes the available mtools commands, and the command
1058 line parameters that each of them accepts. Options which are common to
1059 all mtools commands are not described here, *note arguments:: for a
1060 description of those.
1061
1062 * Menu:
1063
1064 * floppyd::           floppy daemon to run on your X server box
1065 * floppyd_installtest:: small utility to check for the presence of floppyd
1066 * mattrib::           change MS-DOS file attribute flags
1067 * mbadblocks::        tests a floppy disk, and marks the bad blocks in the FAT
1068 * mcat::              same as cat. Only useful with floppyd.
1069 * mcd::               change MS-DOS directory
1070 * mclasserase::       erase memory card
1071 * mcopy::             copy MS-DOS files to/from Unix
1072 * mdel::              delete an MS-DOS file
1073 * mdeltree::          recursively delete an MS-DOS directory
1074 * mdir::              display an MS-DOS directory
1075 * mdu::               list space occupied by directory and its contents
1076 * mformat::           add an MS-DOS file system to a low-level formatted floppy disk
1077 * minfo::             get information about an MS-DOS file system.
1078 * mlabel::            make an MS-DOS volume label
1079 * mkmanifest::        makes a list of short name equivalents
1080 * mmd::               make an MS-DOS subdirectory
1081 * mmount::            mount an MS-DOS disk
1082 * mpartition::        create an MS-DOS as a partition
1083 * mrd::               remove an MS-DOS subdirectory
1084 * mmove::             move or rename an MS-DOS file or subdirectory
1085 * mren::              rename an existing MS-DOS file
1086 * mshortname::        shows the short name of a file
1087 * mshowfat::          shows the FAT map of a file
1088 * mtoolstest::        tests and displays the configuration
1089 * mtype::             display contents of an MS-DOS file
1090 * mzip::              zip disk specific commands
1091
1092 \1f
1093 File: mtools.info,  Node: floppyd,  Next: floppyd_installtest,  Prev: Commands,  Up: Commands
1094
1095 4.1 Floppyd
1096 ===========
1097
1098 `Floppyd' is used as a server to grant access to the floppy drive to
1099 clients running on a remote machine, just as an X server grants access
1100 to the display to remote clients.  It has the following syntax:
1101
1102    `floppyd' [`-d'] [`-l'] [`-s' PORT] [`-r' USER] [`-b' IPADDR] [`-x'
1103 DISPLAY] DEVICENAMES
1104
1105    `floppyd' is always associated with an X server.  It runs on the
1106 same machine as its X server, and listens on port 5703 and above.
1107
1108 4.1.1 Authentication
1109 --------------------
1110
1111 `floppyd' authenticates remote clients using the `Xauthority' protocol.
1112 Xhost authentication is not supported. Each floppyd is associated with
1113 an X server.  When a remote client attempts to connect to floppyd, it
1114 sends floppyd the X authority record corresponding to floppyd's X
1115 server.  Floppyd in turn then tries to open up a connection to the X
1116 server in order to verify the authenticity of the xauth record.  If the
1117 connection to the X server succeeds, the client is granted access.
1118 `DISPLAY'.
1119
1120    *Caution*: In order to make authentication work correctly, the local
1121 host should *not* be listed in the `xhost' list of allowed hosts.
1122 Indeed, hosts listed in `xhost' do not need a correct `Xauthority'
1123 cookie to connect to the X server. As `floppyd' runs on the same host
1124 as the X server, all its probe connection would succeed even for
1125 clients who supplied a bad cookie.  This means that your floppy drive
1126 would be open to the world, i.e. a huge security hole.   If your X
1127 server does not allow you to remove `localhost:0' and `:0' from the
1128 `xhost' list, you can prevent floppyd from probing those display names
1129 with the `-l' option.
1130
1131 4.1.2 Command line options
1132 --------------------------
1133
1134 `d'
1135      Daemon mode. Floppyd runs its own server loop.  Do not supply this
1136      if you start floppyd from `inetd.conf'
1137
1138 `s  PORT'
1139      Port number for daemon mode.  Default is 5703 + DISPLAYNUMBER.
1140      This flag implies daemon mode.  For example, for display
1141      `hitchhiker:5', the port would be 5708.
1142
1143 `b  IPADDR'
1144      Bind address (for multi homed hosts). This flag implies daemon mode
1145
1146 `r USER'
1147      Run the server under as the given user
1148
1149 `x DISPLAY'
1150      X display to use for authentication. By default, this is taken
1151      from the `DISPLAY' variable. If neither the `x' attribute is
1152      present nor `DISPLAY' is set, floppyd uses `:0.0'.
1153
1154    DEVICENAMES is a list of device nodes to be opened.  Default is
1155 `/dev/fd0'. Multiple devices are only supported on mtools versions
1156 newer than 3.9.11.
1157
1158 4.1.3 Connecting to floppyd
1159 ---------------------------
1160
1161 In order to use floppyd, add the flag `remote' to the device
1162 description in your `~/.mtoolsrc' file.  If the flag `remote' is given,
1163 the `file' parameter of the device description is taken to be a remote
1164 address.  It's format is the following:
1165 HOSTNAME`:'DISPLAYNUMBER[`/'[BASEPORT][`/'DRIVE]]. When using this
1166 entry, mtools connects to port BASEPORT+DISPLAYNUMBER at HOSTNAME. By
1167 default BASEPORT is 5703. The drive parameter is to distinguish among
1168 multiple drives associated with a single display (only mtools versions
1169 more recent than 3.9.11)
1170
1171 4.1.4 Examples:
1172 ---------------
1173
1174 The following starts a floppy daemon giving access to `/dev/fd0',
1175 listening on the default port 5703, tied to the default X servers:
1176
1177      floppyd -d /dev/fd0
1178
1179    Each of the following starts a floppy daemon giving access to
1180 `/dev/fd1', tied to the :1 local X servers, and listening on port 5704.
1181 We assume that the local host is named `hitchhiker'.
1182
1183      floppyd -d /dev/fd0
1184      floppyd -d -x :1 -p 5704 /dev/fd0
1185
1186    If you want to start floppyd by `inetd' instead of running it as a
1187 daemon, insert the following lines into `/etc/services':
1188      # floppy daemon
1189      floppyd-0    5703/tcp    # floppy daemon for X server :0
1190      floppyd-1    5704/tcp    # floppy daemon for X server :1
1191
1192    And insert the following into `/etc/inetd.conf' (assuming that you
1193 have defined a user named floppy in your `/etc/passwd'):
1194
1195      # floppy daemon
1196      floppyd-0 stream  tcp  wait  floppy  /usr/sbin/floppyd floppyd /dev/fd0
1197      floppyd-1 stream  tcp  wait  floppy  /usr/sbin/floppyd floppyd -x :1 /dev/fd0
1198
1199    Note that you need to supply the X display names for the second
1200 floppyd.  This is because the port is opened by inetd.conf, and hence
1201 floppyd cannot know its number to interfere the display number.
1202
1203    On the client side, insert the following into your `~/.mtoolsrc' to
1204 define a drive letter accessing floppy drive in your X terminal:
1205      drive x: file="$DISPLAY" remote
1206
1207    If your X terminal has more than one drive, you may access the
1208 additional drives as follows:
1209      drive y: file="$DISPLAY//1" remote
1210      drive z: file="$DISPLAY//2" remote
1211
1212 \1f
1213 File: mtools.info,  Node: floppyd_installtest,  Next: mattrib,  Prev: floppyd,  Up: Commands
1214
1215 4.2 Floppyd_installtest
1216 =======================
1217
1218 `Floppyd_installtest' is used to check for the presence of a running
1219 floppyd daemon. This is useful, if you have a small front-end script to
1220 mtools, which decides whether to use floppyd or not.
1221
1222    `floppyd_installtest' [`-f']  Connect-String
1223
1224    If the `-f' option is specified, `floppyd_installtest' does a full
1225 X-Cookie authentication and complains if this does not work.
1226
1227    The connect-String has the format described in the floppyd-section:
1228 HOSTNAME`:'DISPLAYNUMBER[`/'BASEPORT]
1229
1230 \1f
1231 File: mtools.info,  Node: mattrib,  Next: mbadblocks,  Prev: floppyd_installtest,  Up: Commands
1232
1233 4.3 Mattrib
1234 ===========
1235
1236 `Mattrib' is used to change MS-DOS file attribute flags. It has the
1237 following syntax:
1238
1239    `mattrib' [`-a|+a'] [`-h|+h'] [`-r|+r'] [`-s|+s'] [`-/']  [`-p']
1240 [`-X'] MSDOSFILE [ MSDOSFILES ... ]
1241
1242    `Mattrib' adds attribute flags to an MS-DOS file (with the ``+''
1243 operator) or remove attribute flags (with the ``-'' operator).
1244
1245    `Mattrib' supports the following attribute bits:
1246
1247 `a'
1248      Archive bit.  Used by some backup programs to indicate a new file.
1249
1250 `r'
1251      Read-only bit.  Used to indicate a read-only file.  Files with
1252      this bit set cannot be erased by `DEL' nor modified.
1253
1254 `s'
1255      System bit.  Used by MS-DOS to indicate a operating system file.
1256
1257 `h'
1258      Hidden bit.  Used to make files hidden from `DIR'.
1259
1260    `Mattrib' supports the following command line flags:
1261 `/'
1262      Recursive.  Recursively list the attributes of the files in the
1263      subdirectories.
1264
1265 `X'
1266      Concise. Prints the attributes without any whitespace padding.  If
1267      neither the "/" option is given, nor the MSDOSFILE contains a
1268      wildcard, and there is only one MS-DOS file parameter on the
1269      command line, only the attribute is printed, and not the filename.
1270      This option is convenient for scripts
1271
1272 `p'
1273      Replay mode.  Outputs a series of mformat commands that will
1274      reproduce the current situation, starting from a situation as left
1275      by untarring the MS-DOS file system.  Commands are only output for
1276      attribute settings that differ from the default (archive bit set
1277      for files, unset for directories).  This option is intended to be
1278      used in addition to tar. The `readonly' attribute is not taken
1279      into account, as tar can set that one itself.
1280
1281 \1f
1282 File: mtools.info,  Node: mbadblocks,  Next: mcat,  Prev: mattrib,  Up: Commands
1283
1284 4.4 Mbadblocks
1285 ==============
1286
1287 The `mbadblocks' command is used to mark some clusters on an MS-DOS
1288 filesystem bad. It has the following syntax:
1289
1290    `mbadblocks' [`-s' SECTORLIST|`-c' CLUSTERLIST|-w] DRIVE`:'
1291
1292    If no command line flags are supplied, `Mbadblocks' scans an MS-DOS
1293 filesystem for bad blocks by simply trying to read them and flag them
1294 if read fails. All blocks that are unused are scanned, and if detected
1295 bad are marked as such in the FAT.
1296
1297    This command is intended to be used right after `mformat'.  It is
1298 not intended to salvage data from bad disks.
1299
1300 4.4.1 Command line options
1301 --------------------------
1302
1303 `c FILE'
1304      Use a list of bad clusters, rather than scanning for bad clusters
1305      itself.
1306
1307 `s FILE'
1308      Use a list of bad sectors (counted from beginning of filesystem),
1309      rather than trying for bad clusters itself.
1310
1311 `w'
1312      Write a random pattern to each cluster, then read it back and flag
1313      cluster as bad if mismatch. Only free clusters are tested in such a
1314      way, so any file data is preserved.
1315
1316 4.4.2 Bugs
1317 ----------
1318
1319 `Mbadblocks' should (but doesn't yet :-( ) also try to salvage bad
1320 blocks which are in use by reading them repeatedly, and then mark them
1321 bad.
1322
1323 \1f
1324 File: mtools.info,  Node: mcat,  Next: mcd,  Prev: mbadblocks,  Up: Commands
1325
1326 4.5 Mcat
1327 ========
1328
1329 The `mcat' command is used to copy an entire disk image from or to the
1330 floppy device. It uses the following syntax:
1331
1332    `mcat' [`-w'] DRIVE`:' 
1333
1334    `Mcat' performs the same task as the Unix `cat' command. It is
1335 included into the mtools package, since `cat' cannot access remote
1336 floppy devices offered by the mtools floppy daemon.  Now it is possible
1337 to create boot floppies remotely.
1338
1339    The default operation is reading. The output is written to stdout.
1340
1341    If the `-w' option is specified, mcat reads a disk-image from stdin
1342 and writes it to the given device.  *Use this carefully!* Because of
1343 the low-level nature of this command, it will happily destroy any data
1344 written before on the disk without warning!
1345
1346 \1f
1347 File: mtools.info,  Node: mcd,  Next: mclasserase,  Prev: mcat,  Up: Commands
1348
1349 4.6 Mcd
1350 =======
1351
1352 The `mcd' command is used to change the mtools working directory on the
1353 MS-DOS disk. It uses the following syntax:
1354
1355      `mcd' [MSDOSDIRECTORY]
1356
1357    Without arguments, `mcd' reports the current device and working
1358 directory.  Otherwise, `mcd' changes the current device and current
1359 working directory relative to an MS-DOS file system.
1360
1361    The environmental variable `MCWD' may be used to locate the file
1362 where the device and current working directory information is stored.
1363 The default is `$HOME/.mcwd'.  Information in this file is ignored if
1364 the file is more than 6 hours old.
1365
1366    `Mcd' returns 0 on success or 1 on failure.
1367
1368    Unlike MS-DOS versions of `CD', `mcd' can be used to change to
1369 another device. It may be wise to remove old `.mcwd' files at logout.
1370
1371 \1f
1372 File: mtools.info,  Node: mclasserase,  Next: mcopy,  Prev: mcd,  Up: Commands
1373
1374 4.7 Mclasserase
1375 ===============
1376
1377 The `mclasserase' command is used to wipe memory cards by overwriting
1378 it three times: first with `0xff', then with `0x00', then with `0xff'
1379 again. The command uses the following syntax:
1380
1381      `mclasserase' [`-d'] MSDOSDRIVE
1382
1383    MS-DOS drive is optional, if none is specified, use `A:'. If more
1384 than one drive are specified, all but the last are ignored.
1385
1386    `Mclasserase' accepts the following command line options:
1387
1388 `d'
1389      Stop after each erase cycle, for testing purposes
1390
1391 `p'
1392      Not yet implemented
1393
1394    `Mclasserase' returns 0 on success or -1 on failure.
1395
1396 \1f
1397 File: mtools.info,  Node: mcopy,  Next: mdel,  Prev: mclasserase,  Up: Commands
1398
1399 4.8 Mcopy
1400 =========
1401
1402 The `mcopy' command is used to copy MS-DOS files to and from Unix. It
1403 uses the following syntax:
1404
1405      `mcopy' [`-bspanvmQT'] [`-D' CLASH_OPTION] SOURCEFILE TARGETFILE
1406      `mcopy' [`-bspanvmQT'] [`-D' CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY
1407      `mcopy' [`-tnvm'] MSDOSSOURCEFILE
1408
1409    `Mcopy' copies the specified file to the named file, or copies
1410 multiple files to the named directory.  The source and target can be
1411 either MS-DOS or Unix files.
1412
1413    The use of a drive letter designation on the MS-DOS files, 'a:' for
1414 example, determines the direction of the transfer.  A missing drive
1415 designation implies a Unix file whose path starts in the current
1416 directory.  If a source drive letter is specified with no attached file
1417 name (e.g. `mcopy a: .'), all files are copied from that drive.
1418
1419    If only a single, MS-DOS source parameter is provided (e.g. "mcopy
1420 a:foo.exe"), an implied destination of the current directory (``.'') is
1421 assumed.
1422
1423    A filename of ``-'' means standard input or standard output,
1424 depending on its position on the command line.
1425
1426    `Mcopy' accepts the following command line options:
1427
1428 `t'
1429      Text file transfer.  Mcopy translates incoming carriage return/line
1430      feeds to line feeds when copying from MS-DOS to Unix, and
1431      vice-versa when copying from Unix to MS-DOS.
1432
1433 `b'
1434      Batch mode. Optimized for huge recursive copies, but less secure
1435      if a crash happens during the copy.
1436
1437 `s'
1438      Recursive copy.  Also copies directories and their contents
1439
1440 `p'
1441      Preserves the attributes of the copied files
1442
1443 `Q'
1444      When mcopying multiple files, quits as soon as one copy fails (for
1445      example due to lacking storage space on the target disk)
1446
1447 `a'
1448      Text (ASCII) file transfer.  `ASCII' translates incoming carriage
1449      return/line feeds to line feeds.
1450
1451 `T'
1452      Text (ASCII) file transfer with character set conversion.  Differs
1453      from `-a' in the `ASCII' also translates incoming PC-8 characters
1454      to ISO-8859-1 equivalents as far as possible.  When reading DOS
1455      files, untranslatable characters are replaced by '`#''; when
1456      writing DOS files, untranslatable characters are replaced by '`.''.
1457
1458 `n'
1459      No confirmation when overwriting Unix files.  `ASCII' doesn't warn
1460      the user when overwriting an existing Unix file. If the target
1461      file already exists, and the `-n' option is not in effect, `mcopy'
1462      asks whether to overwrite the file or to rename the new file
1463      (*note name clashes::) for details).  In order to switch off
1464      confirmation for DOS files, use `-o'.
1465
1466 `m'
1467      Preserve the file modification time.
1468
1469 `v'
1470      Verbose. Displays the name of each file as it is copied.
1471
1472 4.8.1 Bugs
1473 ----------
1474
1475 Unlike MS-DOS, the '+' operator (append) from MS-DOS is not supported.
1476 However, you may use `mtype' to produce the same effect:
1477      mtype a:file1 a:file2 a:file3 >unixfile
1478      mtype a:file1 a:file2 a:file3 | mcopy - a:msdosfile
1479
1480 \1f
1481 File: mtools.info,  Node: mdel,  Next: mdeltree,  Prev: mcopy,  Up: Commands
1482
1483 4.9 Mdel
1484 ========
1485
1486 The `mdel' command is used to delete an MS-DOS file. Its syntax is:
1487
1488      `mdel' [`-v'] MSDOSFILE [ MSDOSFILES ...  ]
1489
1490    `Mdel' deletes files on an MS-DOS file system.
1491
1492    `Mdel' asks for verification prior to removing a read-only file.
1493
1494 \1f
1495 File: mtools.info,  Node: mdeltree,  Next: mdir,  Prev: mdel,  Up: Commands
1496
1497 4.10 Mdeltree
1498 =============
1499
1500 The `mdeltree' command is used to delete an MS-DOS file. Its syntax is:
1501
1502      `mdeltree' [`-v'] MSDOSDIRECTORY [MSDOSDIRECTORIES...]
1503
1504    `Mdeltree' removes a directory and all the files and subdirectories
1505 it contains from an MS-DOS file system. An error occurs if the directory
1506 to be removed does not exist.
1507
1508 \1f
1509 File: mtools.info,  Node: mdir,  Next: mdu,  Prev: mdeltree,  Up: Commands
1510
1511 4.11 Mdir
1512 =========
1513
1514 The `mdir' command is used to display an MS-DOS directory. Its syntax
1515 is:
1516
1517    `mdir' [`-/'] [`-f'] [`-w'] [`-a'] [`-b'] MSDOSFILE [ MSDOSFILES...]
1518
1519    `Mdir' displays the contents of MS-DOS directories, or the entries
1520 for some MS-DOS files.
1521
1522    `Mdir' supports the following command line options:
1523
1524 `/'
1525      Recursive output, just like MS-DOS' `-s' option
1526
1527 `w'
1528      Wide output.  With this option, `mdir' prints the filenames across
1529      the page without displaying the file size or creation date.
1530
1531 `a'
1532      Also list hidden files.
1533
1534 `f'
1535      Fast.  Do not try to find out free space.  On larger disks,
1536      finding out the amount of free space takes up some non trivial
1537      amount of time, as the whole FAT must be read in and scanned.  The
1538      `-f' flag bypasses this step.  This flag is not needed on FAT32
1539      file systems, which store the size explicitly.
1540
1541 `b'
1542      Concise listing. Lists each directory name or filename, one per
1543      line (including the filename extension). This switch displays no
1544      heading information and no summary. Only a newline separated list
1545      of pathnames is displayed.
1546
1547    An error occurs if a component of the path is not a directory.
1548
1549 \1f
1550 File: mtools.info,  Node: mdu,  Next: mformat,  Prev: mdir,  Up: Commands
1551
1552 4.12 Mdu
1553 ========
1554
1555 `Mdu' is used to list the space occupied by a directory, its
1556 subdirectories and its files. It is similar to the `du' command on
1557 Unix.  The unit used are clusters.  Use the minfo command to find out
1558 the cluster size.
1559
1560    `mdu' [`-a'] [ MSDOSFILES ... ]
1561
1562 `a'
1563      All files.  List also the space occupied for individual files.
1564
1565 `s'
1566      Only list the total space, don't give details for each
1567      subdirectory.
1568
1569 \1f
1570 File: mtools.info,  Node: mformat,  Next: mkmanifest,  Prev: mdu,  Up: Commands
1571
1572 4.13 Mformat
1573 ============
1574
1575 The `mformat' command is used to add an MS-DOS file system to a
1576 low-level formatted diskette. Its syntax is:
1577
1578      `mformat' [`-t' CYLINDERS|`-T' TOT_SECTORS] [`-h' HEADS] [`-s' SECTORS]
1579        [`-f' SIZE] [`-1'] [`-4'] [`-8']
1580        [`-v' VOLUME_LABEL]
1581        [`-F'] [`-S' SIZECODE]
1582        [`-M' SOFTWARE_SECTOR_SIZE]
1583        [`-N' SERIAL_NUMBER] [`-a']
1584        [`-C'] [`-H' HIDDEN_SECTORS] [`-I' FSVERSION]
1585        [`-r' ROOT_SECTORS] [`-L' FAT_LEN]
1586        [`-B' BOOT_SECTOR] [`-k']
1587        [`-m' MEDIA_DESCRIPTOR]
1588        [`-K' BACKUP_BOOT]
1589        [`-c' CLUSTERS_PER_SECTOR]
1590        [`-d' FAT_COPIES]
1591        [`-X'] [`-2' SECTORS_ON_TRACK_0] [`-3']
1592        [`-0' RATE_ON_TRACK_0] [`-A' RATE_ON_OTHER_TRACKS]
1593        DRIVE:
1594
1595    `Mformat' adds a minimal MS-DOS file system (boot sector, FAT, and
1596 root directory) to a diskette that has already been formatted by a Unix
1597 low-level format.
1598
1599    The following options are supported: (The S, 2, 1 and M options may
1600 not exist if this copy of mtools has been compiled without the USE_2M
1601 option)
1602
1603    The following options are the same as for MS-DOS's format command:
1604
1605 `v'
1606      Specifies the volume label. A volume label identifies the disk and
1607      can be a maximum of 11 characters. If you omit the -v switch,
1608      mformat will assign no label to the disk.
1609
1610 `f'
1611      Specifies the size of the DOS file system to format. Only a certain
1612      number of predefined sizes are supported by this flag; for others
1613      use the -h/-t/-s flags. The following sizes are supported:
1614     160
1615           160K, single-sided, 8 sectors per track, 40 cylinders (for 5
1616           1/4 DD)
1617
1618     180
1619           160K, single-sided, 9 sectors per track, 40 cylinders (for 5
1620           1/4 DD)
1621
1622     320
1623           320K, double-sided, 8 sectors per track, 40 cylinders (for 5
1624           1/4 DD)
1625
1626     360
1627           360K, double-sided, 9 sectors per track, 40 cylinders (for 5
1628           1/4 DD)
1629
1630     720
1631           720K, double-sided, 9 sectors per track, 80 cylinders (for 3
1632           1/2 DD)
1633
1634     1200
1635           1200K, double-sided, 15 sectors per track, 80 cylinders (for
1636           5 1/4 HD)
1637
1638     1440
1639           1440K, double-sided, 18 sectors per track, 80 cylinders (for
1640           3 1/2 HD)
1641
1642     2880
1643           2880K, double-sided, 36 sectors per track, 80 cylinders (for
1644           3 1/2 ED)
1645
1646 `t'
1647      Specifies the number of tracks on the disk.
1648
1649 `T'
1650      Specifies the number of total sectors on the disk. Only one of
1651      these 2 options may be specified (tracks or total sectors)
1652
1653 `h'
1654      The number of heads (sides).
1655
1656 `s'
1657      Specifies the number of sectors per track. If the 2m option is
1658      given, number of 512-byte sector equivalents on generic tracks
1659      (i.e. not head 0 track 0).  If the 2m option is not given, number
1660      of physical sectors per track (which may be bigger than 512 bytes).
1661
1662 `1'
1663      Formats a single side (equivalent to -h 1)
1664
1665 `4'
1666      Formats a 360K double-sided disk (equivalent to -f 360). When used
1667      together with -the 1 switch, this switch formats a 180K disk
1668
1669 `8'
1670      Formats a disk with 8 sectors per track.
1671
1672
1673    MS-DOS format's `q', `u' and `b' options are not supported, and `s'
1674 has a different meaning.
1675
1676    The following options are specific to mtools:
1677
1678 `F'
1679      Format the partition as FAT32.
1680
1681 `S'
1682      The size code. The size of the sector is 2 ^ (sizecode + 7).
1683
1684 `X'
1685      formats the disk as an XDF disk. *Note XDF::, for more details.
1686      The disk has first to be low-level formatted using the xdfcopy
1687      utility included in the fdutils package. XDF disks are used for
1688      instance for OS/2 install disks.
1689
1690 `2'
1691      2m format. The parameter to this option describes the number of
1692      sectors on track 0, head 0. This option is recommended for sectors
1693      bigger than normal.
1694
1695 `3'
1696      don't use a 2m format, even if the current geometry of the disk is
1697      a 2m geometry.
1698
1699 `0'
1700      Data transfer rate on track 0
1701
1702 `A'
1703      Data transfer rate on tracks other than 0
1704
1705 `M'
1706      software sector size. This parameter describes the sector size in
1707      bytes used by the MS-DOS file system. By default it is the
1708      physical sector size.
1709
1710 `N'
1711      Uses the requested serial number, instead of generating one
1712      automatically
1713
1714 `a'
1715      If this option is given, an Atari style serial number is generated.
1716      Ataris store their serial number in the OEM label.
1717
1718 `C'
1719      creates the disk image file to install the MS-DOS file system on
1720      it. Obviously, this is useless on physical devices such as floppies
1721      and hard disk partitions, but is interesting for image files.
1722
1723 `H'
1724      number of hidden sectors. This parameter is useful for formatting
1725      hard disk partition, which are not aligned on track boundaries
1726      (i.e. first head of first track doesn't belong to the partition,
1727      but contains a partition table). In that case the number of hidden
1728      sectors is in general the number of sectors per cylinder. This is
1729      untested.
1730
1731 `I'
1732      Sets the fsVersion id when formatting a FAT32 drive.  In order to
1733      find this out, run minfo on an existing FAT32 drive, and mail me
1734      about it, so I can include the correct value in future versions of
1735      mtools.
1736
1737 `c'
1738      Sets the size of a cluster (in sectors).  If this cluster size
1739      would generate a FAT that too big for its number of bits, mtools
1740      automatically increases the cluster size, until the FAT is small
1741      enough.
1742
1743 `d'
1744      Sets the number of FAT copies. Default is 2. This setting can also
1745      be specified using the `MTOOLS_NFATS' environment variable.
1746
1747 `r'
1748      Sets the size of the root directory (in sectors).  Only applicable
1749      to 12 and 16 bit FATs. This setting can also be specified using the
1750      `MTOOLS_DIR_LEN' environment variable.
1751
1752 `L'
1753      Sets the length of the FAT.
1754
1755 `B'
1756      Use the boot sector stored in the given file or device, instead of
1757      using its own.  Only the geometry fields are updated to match the
1758      target disks parameters.
1759
1760 `k'
1761      Keep the existing boot sector as much as possible.  Only the
1762      geometry fields and other similar file system data are updated to
1763      match the target disks parameters.
1764
1765 `K'
1766      Sets the sector number where the backup of the boot sector should
1767      be stored (only relevant on FAT32).
1768
1769 `m'
1770      Use a non-standard media descriptor byte for this disk. The media
1771      descriptor is stored at position 21 of the boot sector, and as
1772      first byte in each FAT copy. Using this option may confuse DOS or
1773      older mtools version, and may make the disk unreadable. Only use
1774      if you know what you are doing.
1775
1776
1777    To format a diskette at a density other than the default, you must
1778 supply (at least) those command line parameters that are different from
1779 the default.
1780
1781    `Mformat' returns 0 on success or 1 on failure.
1782
1783    It doesn't record bad block information to the Fat, use `mbadblocks'
1784 for that.
1785
1786 \1f
1787 File: mtools.info,  Node: mkmanifest,  Next: minfo,  Prev: mformat,  Up: Commands
1788
1789 4.14 Mkmanifest
1790 ===============
1791
1792 The `mkmanifest' command is used to create a shell script (packing
1793 list) to restore Unix filenames. Its syntax is:
1794
1795    `mkmanifest' [ FILES ]
1796
1797    `Mkmanifest' creates a shell script that aids in the restoration of
1798 Unix filenames that got clobbered by the MS-DOS filename restrictions.
1799 MS-DOS filenames are restricted to 8 character names, 3 character
1800 extensions, upper case only, no device names, and no illegal characters.
1801
1802    The mkmanifest program is compatible with the methods used in
1803 `pcomm, arc,' and `mtools' to change perfectly good Unix filenames to
1804 fit the MS-DOS restrictions. This command is only useful if the target
1805 system which will read the diskette cannot handle VFAT long names.
1806
1807 4.14.1 Example
1808 --------------
1809
1810 You want to copy the following Unix files to a MS-DOS diskette (using
1811 the `mcopy' command).
1812
1813        very_long_name
1814        2.many.dots
1815        illegal:
1816        good.c
1817        prn.dev
1818        Capital
1819
1820    `ASCII' converts the names to:
1821
1822        very_lon
1823        2xmany.dot
1824        illegalx
1825        good.c
1826        xprn.dev
1827        capital
1828
1829    The command:
1830      mkmanifest very_long_name 2.many.dots illegal: good.c prn.dev Capital >manifest
1831    would produce the following:
1832        mv very_lon very_long_name
1833        mv 2xmany.dot 2.many.dots
1834        mv illegalx illegal:
1835        mv xprn.dev prn.dev
1836        mv capital Capital
1837
1838    Notice that "good.c" did not require any conversion, so it did not
1839 appear in the output.
1840
1841    Suppose I've copied these files from the diskette to another Unix
1842 system, and I now want the files back to their original names.  If the
1843 file "manifest" (the output captured above) was sent along with those
1844 files, it could be used to convert the filenames.
1845
1846 4.14.2 Bugs
1847 -----------
1848
1849 The short names generated by `mkmanifest' follow the old convention
1850 (from mtools-2.0.7) and not the one from Windows 95 and mtools-3.0.
1851
1852 \1f
1853 File: mtools.info,  Node: minfo,  Next: mlabel,  Prev: mkmanifest,  Up: Commands
1854
1855 4.15 Minfo
1856 ==========
1857
1858 The `minfo' command prints the parameters of a MS-DOS file system, such
1859 as number of sectors, heads and cylinders.  It also prints an mformat
1860 command line which can be used to create a similar MS-DOS file system on
1861 another media.  However, this doesn't work with 2m or XDF media, and
1862 with MS-DOS 1.0 file systems
1863      `minfo' DRIVE:
1864
1865    Minfo supports the following option:
1866 `v'
1867      Prints a hexdump of the boot sector, in addition to the other
1868      information
1869
1870 \1f
1871 File: mtools.info,  Node: mlabel,  Next: mmd,  Prev: minfo,  Up: Commands
1872
1873 4.16 Mlabel
1874 ===========
1875
1876 The `mlabel' command adds a volume label to a disk. Its syntax is:
1877      `mlabel' [`-vcsn'] [`-N' SERIAL] DRIVE:[NEW_LABEL]
1878
1879    `Mlabel' displays the current volume label, if present. If NEW_LABEL
1880 is not given, and if neither the `c' nor the `s' options are set, it
1881 prompts the user for a new volume label.  To delete an existing volume
1882 label, press return at the prompt.
1883
1884    The label is limited to 11 single-byte characters, e.g.
1885 `Name1234567'.
1886
1887    Reasonable care is taken to create a valid MS-DOS volume label.  If
1888 an invalid label is specified, `mlabel' changes the label (and displays
1889 the new label if the verbose mode is set). `Mlabel' returns 0 on
1890 success or 1 on failure.
1891
1892    Mlabel supports the following options:
1893 `c'
1894      Clears an existing label, without prompting the user
1895
1896 `s'
1897      Shows the existing label, without prompting the user.
1898
1899 `n'
1900      Assigns a new (random) serial number to the disk
1901
1902 `N SERIAL'
1903      Sets the supplied serial number. The serial number should be
1904      supplied as an 8 digit hexadecimal number, without spaces
1905
1906 \1f
1907 File: mtools.info,  Node: mmd,  Next: mmount,  Prev: mlabel,  Up: Commands
1908
1909 4.17 Mmd
1910 ========
1911
1912 The `mmd' command is used to make an MS-DOS subdirectory. Its syntax is:
1913
1914    `mmd' [`-D' CLASH_OPTION] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ]
1915
1916    `Mmd' makes a new directory on an MS-DOS file system. An error occurs
1917 if the directory already exists.
1918
1919 \1f
1920 File: mtools.info,  Node: mmount,  Next: mmove,  Prev: mmd,  Up: Commands
1921
1922 4.18 Mmount
1923 ===========
1924
1925 The `mmount' command is used to mount an MS-DOS disk. It is only
1926 available on Linux, as it is only useful if the OS kernel allows to
1927 configure the disk geometry. Its syntax is:
1928
1929    `mmount' MSDOSDRIVE [MOUNTARGS]
1930
1931    `Mmount' reads the boot sector of an MS-DOS disk, configures the
1932 drive geometry, and finally mounts it passing `mountargs' to `mount. '
1933 If no mount arguments are specified, the name of the device is used. If
1934 the disk is write protected, it is automatically mounted read only.
1935
1936 \1f
1937 File: mtools.info,  Node: mmove,  Next: mpartition,  Prev: mmount,  Up: Commands
1938
1939 4.19 Mmove
1940 ==========
1941
1942 The `mmove' command is used to moves or renames an existing MS-DOS file
1943 or subdirectory.
1944      `mmove' [`-v'] [`-D' CLASH_OPTION] SOURCEFILE TARGETFILE
1945      `mmove' [`-v']  [`-D' CLASH_OPTION] SOURCEFILE [ SOURCEFILES... ] TARGETDIRECTORY
1946    `Mmove' moves or renames an existing MS-DOS file or subdirectory.
1947 Unlike the MS-DOS version of `MOVE', `mmove' is able to move
1948 subdirectories.  Files or directories can only be moved within one file
1949 system. Data cannot be moved from MS-DOS to Unix or vice-versa.  If you
1950 omit the drive letter from the target file or directory, the same
1951 letter as for the source is assumed.  If you omit the drive letter from
1952 all parameters, drive a: is assumed by default.
1953
1954 \1f
1955 File: mtools.info,  Node: mpartition,  Next: mrd,  Prev: mmove,  Up: Commands
1956
1957 4.20 Mpartition
1958 ===============
1959
1960 The `mpartition' command is used to create MS-DOS file systems as
1961 partitions.  This is intended to be used on non-Linux systems, i.e.
1962 systems where fdisk and easy access to SCSI devices are not available.
1963 This command only works on drives whose partition variable is set.
1964
1965      `mpartition' `-p' DRIVE
1966      `mpartition' `-r' DRIVE
1967      `mpartition' `-I' [`-B' BOOTSECTOR] DRIVE
1968      `mpartition' `-a' DRIVE
1969      `mpartition' `-d' DRIVE
1970      `mpartition' `-c' [`-s' SECTORS] [`-h' HEADS]
1971      [`-t' CYLINDERS] [`-v' [`-T' TYPE] [`-b'
1972      BEGIN] [`-l' length] [`-f']
1973
1974    Mpartition supports the following operations:
1975
1976 `p'
1977      Prints a command line to recreate the partition for the drive.
1978      Nothing is printed if the partition for the drive is not defined,
1979      or an inconsistency has been detected.  If verbose (`-v') is also
1980      set, prints the current partition table.
1981
1982 `r'
1983      Removes the partition described by DRIVE.
1984
1985 `I'
1986      Initializes the partition table, and removes all partitions.
1987
1988 `c'
1989      Creates the partition described by DRIVE.
1990
1991 `a'
1992      "Activates" the partition, i.e. makes it bootable.  Only one
1993      partition can be bootable at a time.
1994
1995 `d'
1996      "Deactivates" the partition, i.e. makes it unbootable.
1997
1998    If no operation is given, the current settings are printed.
1999
2000    For partition creations, the following options are available:
2001 `s SECTORS'
2002      The number of sectors per track of the partition (which is also the
2003      number of sectors per track for the whole drive).
2004
2005 `h HEADS'
2006      The number of heads of the partition (which is also the number of
2007      heads for the whole drive).  By default, the geometry information
2008      (number of sectors and heads) is figured out from neighboring
2009      partition table entries, or guessed from the size.
2010
2011 `t CYLINDERS'
2012      The number of cylinders of the partition (not the number of
2013      cylinders of the whole drive.
2014
2015 `b BEGIN'
2016      The starting offset of the partition, expressed in sectors. If
2017      begin is not given, mpartition lets the partition begin at the
2018      start of the disk (partition number 1), or immediately after the
2019      end of the previous partition.
2020
2021 `l LENGTH'
2022      The size (length) of the partition, expressed in sectors.  If end
2023      is not given, mpartition figures out the size from the number of
2024      sectors, heads and cylinders.  If these are not given either, it
2025      gives the partition the biggest possible size, considering disk
2026      size and start of the next partition.
2027
2028    The following option is available for all operation which modify the
2029 partition table:
2030 `f'
2031      Usually, before writing back any changes to the partition,
2032      mpartition performs certain consistency checks, such as checking
2033      for overlaps and proper alignment of the partitions.  If any of
2034      these checks fails, the partition table is not changes.  The `-f'
2035      allows you to override these safeguards.
2036
2037    The following options are available for all operations:
2038 `v'
2039      Together with `-p' prints the partition table as it is now (no
2040      change operation), or as it is after it is modified.
2041
2042 `vv'
2043      If the verbosity flag is given twice, mpartition will print out a
2044      hexdump of the partition table when reading it from and writing it
2045      to the device.
2046
2047    The following option is available for partition table initialization:
2048 `B BOOTSECTOR'
2049      Reads the template master boot record from file BOOTSECTOR.
2050
2051 \1f
2052 File: mtools.info,  Node: mrd,  Next: mren,  Prev: mpartition,  Up: Commands
2053
2054 4.21 Mrd
2055 ========
2056
2057 The `mrd' command is used to remove an MS-DOS subdirectory. Its syntax
2058 is:
2059
2060      `mrd' [`-v'] MSDOSDIRECTORY [ MSDOSDIRECTORIES... ]
2061
2062    `Mrd' removes a directory from an MS-DOS file system. An error occurs
2063 if the directory does not exist or is not empty.
2064
2065 \1f
2066 File: mtools.info,  Node: mren,  Next: mshortname,  Prev: mrd,  Up: Commands
2067
2068 4.22 Mren
2069 =========
2070
2071 The `mren' command is used to rename or move an existing MS-DOS file or
2072 subdirectory. Its syntax is:
2073
2074      `mren' [`-voOsSrRA'] SOURCEFILE TARGETFILE
2075
2076    `Mren' renames an existing file on an MS-DOS file system.
2077
2078    In verbose mode, `Mren' displays the new filename if the name
2079 supplied is invalid.
2080
2081    If the first syntax is used (only one source file), and if the target
2082 name doesn't contain any slashes or colons, the file (or subdirectory)
2083 is renamed in the same directory, instead of being moved to the current
2084 `mcd' directory as would be the case with `mmove'. Unlike the MS-DOS
2085 version of `REN', `mren' can be used to rename directories.
2086
2087 \1f
2088 File: mtools.info,  Node: mshortname,  Next: mshowfat,  Prev: mren,  Up: Commands
2089
2090 4.23 Mshortname
2091 ===============
2092
2093 The `mshortname' command is used to display the short name of a file.
2094 Syntax:
2095
2096      `mshortname' FILES
2097
2098    The shortname is displayed as it is stored in raw format on disk,
2099 without any character set conversion.
2100
2101 \1f
2102 File: mtools.info,  Node: mshowfat,  Next: mtoolstest,  Prev: mshortname,  Up: Commands
2103
2104 4.24 Mshowfat
2105 =============
2106
2107 The `mshowfat' command is used to display the FAT entries for a file.
2108 Syntax:
2109
2110      `mshowfat' [`-o' OFFSET] FILES
2111
2112    If no offset is given, a list of all clusters occupied by the file is
2113 printed. If an offset is given, only the number of the cluster
2114 containing that offset is printed.
2115
2116 \1f
2117 File: mtools.info,  Node: mtoolstest,  Next: mtype,  Prev: mshowfat,  Up: Commands
2118
2119 4.25 Mtoolstest
2120 ===============
2121
2122 The `mtoolstest' command is used to tests the mtools configuration
2123 files. To invoke it, just type `mtoolstest' without any arguments.
2124 `Mtoolstest' reads the mtools configuration files, and prints the
2125 cumulative configuration to `stdout'. The output can be used as a
2126 configuration file itself (although you might want to remove redundant
2127 clauses).  You may use this program to convert old-style configuration
2128 files into new style configuration files.
2129
2130 \1f
2131 File: mtools.info,  Node: mtype,  Next: mzip,  Prev: mtoolstest,  Up: Commands
2132
2133 4.26 Mtype
2134 ==========
2135
2136 The `mtype' command is used to display contents of an MS-DOS file. Its
2137 syntax is:
2138
2139      `mtype' [`-ts'] MSDOSFILE [ MSDOSFILES... ]
2140
2141    `Mtype' displays the specified MS-DOS file on the screen.
2142
2143    In addition to the standard options, `Mtype' allows the following
2144 command line options:
2145
2146 `t'
2147      Text file viewing.  `Mtype' translates incoming carriage
2148      return/line feeds to line feeds.
2149
2150 `s'
2151      `Mtype' strips the high bit from the data.
2152
2153    The `mcd' command may be used to establish the device and the
2154 current working directory (relative to MS-DOS), otherwise the default is
2155 `A:/'.
2156
2157    `Mtype' returns 0 on success, 1 on utter failure, or 2 on partial
2158 failure.
2159
2160    Unlike the MS-DOS version of `TYPE', `mtype' allows multiple
2161 arguments.
2162
2163 \1f
2164 File: mtools.info,  Node: mzip,  Prev: mtype,  Up: Commands
2165
2166 4.27 Mzip
2167 =========
2168
2169 The `mzip' command is used to issue ZIP disk specific commands on
2170 Linux, Solaris or HP-UX. Its syntax is:
2171
2172      `mzip' [`-epqrwx']
2173
2174    `Mzip' allows the following command line options:
2175
2176 `e'
2177      Ejects the disk.
2178
2179 `f'
2180      Force eject even if the disk is mounted (must be given in addition
2181      to `-e').
2182
2183 `r'
2184      Write protect the disk.
2185
2186 `w'
2187      Remove write protection.
2188
2189 `p'
2190      Password write protect.
2191
2192 `x'
2193      Password protect
2194
2195 `u'
2196      Temporarily unprotect the disk until it is ejected.  The disk
2197      becomes writable, and reverts back to its old state when ejected.
2198
2199 `q'
2200      Queries the status
2201
2202    To remove the password, set it to one of the password-less modes
2203 `-r' or `-w': mzip will then ask you for the password, and unlock the
2204 disk.  If you have forgotten the password, you can get rid of it by
2205 low-level formatting the disk (using your SCSI adapter's BIOS setup).
2206
2207    The ZipTools disk shipped with the drive is also password protected.
2208 On MS-DOS or on a Mac, this password is automatically removed once the
2209 ZipTools have been installed.  From various articles posted to Usenet, I
2210 learned that the password for the tools disk is
2211 `APlaceForYourStuff'(1).  Mzip knows about this password, and tries it
2212 first, before prompting you for a password.  Thus `mzip -w z:' unlocks
2213 the tools disk(2).  The tools disk is formatted in a special way so as
2214 to be usable both in a PC and in a Mac.  On a PC, the Mac file system
2215 appears as a hidden file named `partishn.mac'.  You may erase it to
2216 reclaim the 50 Megs of space taken up by the Mac file system.
2217
2218 4.27.1 Bugs
2219 -----------
2220
2221 This command is a big kludge.  A proper implementation would take a
2222 rework of significant parts of mtools, but unfortunately I don't have
2223 the time for this right now. The main downside of this implementation is
2224 that it is inefficient on some architectures (several successive calls
2225 to mtools, which defeats mtools' caching).
2226
2227    ---------- Footnotes ----------
2228
2229    (1) To see the articles, search for `APlaceForYourStuff' using
2230 Google Groups
2231
2232    (2) I didn't know about this yet when I bought my own Zip drive.
2233 Thus I ended up reformatting my tools disk, and hence I haven't had the
2234 opportunity to test the password yet.  If anybody still has their tools
2235 disk with the original password, could you try it out? Thanks in advance
2236
2237 \1f
2238 File: mtools.info,  Node: Compiling mtools,  Next: Porting mtools,  Prev: Commands,  Up: Top
2239
2240 5 Architecture specific compilation flags
2241 *****************************************
2242
2243 To compile mtools, first invoke `./configure' before `make'. In
2244 addition to the standard `autoconfigure' flags, there are two
2245 architecture specific flags available.
2246
2247 `./configure --enable-xdf'
2248 `./configure --disable-xdf'
2249      Enables support for XDF disks. This is on by default. *Note XDF::,
2250      for details.
2251
2252 `./configure --enable-vold'
2253 `./configure --disable-vold'
2254      Enables support for vold on Solaris. When used in conjunction with
2255      vold, mtools should use different device nodes than for direct
2256      access.
2257
2258 `./configure --enable-new-vold'
2259 `./configure --disable-new-vold'
2260      Enables new support for vold on Solaris. This is supposed to work
2261      more smoothly than the old support.
2262
2263 `./configure --enable-floppyd'
2264 `./configure --disable-floppyd'
2265      Enables support for floppyd.  By default, floppyd support is
2266      enabled as long as the necessary X includes and libraries are
2267      available.
2268
2269 \1f
2270 File: mtools.info,  Node: Porting mtools,  Next: Command Index,  Prev: Compiling mtools,  Up: Top
2271
2272 6 Porting mtools to architectures which are not supported yet
2273 *************************************************************
2274
2275 This chapter is only interesting for those who want to port mtools to
2276 an architecture which is not yet supported. For most common systems,
2277 default drives are already defined. If you want to add default drives
2278 for a still unsupported system, run configuration.guess, to see which
2279 identification autoconf uses for that system. This identification is of
2280 the form cpu-vendor-os (for example sparc-sun-sunos). The cpu and the
2281 OS parts are passed to the compiler as preprocessor flags.   The OS
2282 part is passed to the compiler in three forms.
2283   1. The complete OS name, with dots replaced by underscores.  SCO3.2v2
2284      would yield sco3_2v2
2285
2286   2. The base OS name. SCO3.2v2 would yield Sco
2287
2288   3. The base OS name plus its major version. SCO3.2v2 would yield Sco3
2289
2290    All three versions are passed, if they are different.
2291
2292    To define the devices, use the entries for the systems that are
2293 already present as templates. In general, they have the following form:
2294
2295      #if (defined (my_cpu) && defined(my_os))
2296      #define predefined_devices
2297      struct device devices[] = {
2298              { "/dev/first_drive", 'drive_letter', drive_description},
2299              ...
2300              { "/dev/last_drive", 'drive_letter', drive_description}
2301      }
2302      #define INIT_NOOP
2303      #endif
2304
2305    "/dev/first_drive" is the name of the device or image file
2306 representing the drive. Drive_letter is a letter ranging from a to z
2307 giving access to the drive. Drive_description describes the type of the
2308 drive:
2309 `ED312'
2310      extra density (2.88M) 3 1/2 disk
2311
2312 `HD312'
2313      high density 3 1/2 disk
2314
2315 `DD312'
2316      double density 3 1/2 disk
2317
2318 `HD514'
2319      high density 5 1/4 disk
2320
2321 `DD514'
2322      double density 5 1/4 disk
2323
2324 `DDsmall'
2325      8 sector double density 5 1/4 disk
2326
2327 `SS514'
2328      single sided double density 5 1/4 disk
2329
2330 `SSsmall'
2331      single sided 8 sector double density 5 1/4 disk
2332
2333 `GENFD'
2334      generic floppy drive (12 bit FAT)
2335
2336 `GENHD'
2337      generic hard disk (16 bit FAT)
2338
2339 `GEN'
2340      generic device (all parameters match)
2341
2342 `ZIPJAZ(flags)'
2343      generic ZIP drive using normal access. This uses partition 4.
2344      `Flags' are any special flags to be passed to open.
2345
2346 `RZIPJAZ(flags)'
2347      generic ZIP drive using raw SCSI access. This uses partition 4.
2348      `Flags' are any special flags to be passed to open.
2349
2350 `REMOTE'
2351      the remote drive used for floppyd.  Unlike the other items, this
2352      macro also includes the file name ($DISPLAY) and the drive letter
2353      (X)
2354
2355    Entries may be described in more detail:
2356       fat_bits,open_flags,cylinders,heads,sectors,DEF_ARG
2357     or, if you need to describe an offset (file system doesn't start at
2358 beginning of file system)
2359       fat_bits, open_flags, cylinders, heads, sectors, offset, DEF_ARG0
2360
2361 `fat_bits'
2362      is either 12, 16 or 0. 0 means that the device accepts both types
2363      of FAT.
2364
2365 `open_flags'
2366      may include flags such as O_NDELAY, or O_RDONLY, which might be
2367      necessary to open the device. 0 means no special flags are needed.
2368
2369 `cylinders,heads,sectors'
2370      describe the geometry of the disk. If cylinders is 0, the heads
2371      and sectors parameters are ignored, and the drive accepts any
2372      geometry.
2373
2374 `offset'
2375      is used if the DOS file system doesn't begin at the start of the
2376      device or image file. This is mostly useful for Atari Ram disks
2377      (which contain their device driver at the beginning of the file)
2378      or for DOS emulator images (which may represent a partitioned
2379      device.
2380
2381    Definition of defaults in the devices file should only be done if
2382 these same devices are found on a large number of hosts of this type.
2383 In that case, could you also let me know about your new definitions, so
2384 that I can include them into the next release.  For purely local file, I
2385 recommend that you use the `/etc/mtools.conf' and `~/.mtoolsrc'
2386 configuration files.
2387
2388    However, the devices files also allows to supply geometry setting
2389 routines. These are necessary if you want to access high capacity disks.
2390
2391    Two routines should be supplied:
2392
2393   1. Reading the current parameters
2394           static inline int get_parameters(int fd, struct generic_floppy_struct *floppy)
2395
2396      This probes the current configured geometry, and return it in the
2397      structure generic_floppy_struct (which must also be declared).
2398      Fd is an open file descriptor for the device, and buf is an already
2399      filled in stat structure, which may be useful.   This routine
2400      should return 1 if the probing fails, and 0 otherwise.
2401
2402   2. Setting new parameters
2403           static inline int set_parameters(int fd, struct generic_floppy_struct *floppy)
2404                                            struct stat *buf)
2405       This configures the geometry contained in floppy on the file
2406      descriptor fd. Buf is the result of a stat call (already filled
2407      in).  This should return 1 if the new geometry cannot be
2408      configured, and 0 otherwise.
2409
2410    A certain number of preprocessor macros should also be supplied:
2411
2412 `TRACKS(floppy)'
2413      refers to the track field in the floppy structure
2414
2415 `HEADS(floppy)'
2416      refers to the heads field in the floppy structure
2417
2418 `SECTORS(floppy)'
2419      refers to the sectors per track field in the floppy structure
2420
2421 `SECTORS_PER_DISK(floppy)'
2422      refers to the sectors per disk field in the floppy structure (if
2423      applicable, otherwise leave undefined)
2424
2425 `BLOCK_MAJOR'
2426      major number of the floppy device, when viewed as a block device
2427
2428 `CHAR_MAJOR'
2429      major number of the floppy device, when viewed as a character
2430      device (a.k.a. "raw" device, used for fsck) (leave this undefined,
2431      if your OS doesn't have raw devices)
2432
2433    For the truly high capacity formats (XDF, 2m, etc), there is no clean
2434 and documented interface yet.
2435
2436 \1f
2437 File: mtools.info,  Node: Command Index,  Next: Variable Index,  Prev: Porting mtools,  Up: Top
2438
2439 Command Index
2440 *************
2441
2442 \0\b[index\0\b]
2443 * Menu:
2444 \1f
2445 File: mtools.info,  Node: Variable Index,  Next: Concept Index,  Prev: Command Index,  Up: Top
2446
2447 Variable index
2448 **************
2449
2450 \0\b[index\0\b]
2451 * Menu:
2452
2453 * cylinders:                             geometry description. (line 61)
2454 * drive:                                 general information.  (line  6)
2455 * exclusive:                             open flags.           (line  6)
2456 * fat_bits:                              miscellaneous variables.
2457                                                                (line 11)
2458 * file:                                  location information. (line 10)
2459 * filter:                                miscellaneous flags.  (line 77)
2460 * heads:                                 geometry description. (line 65)
2461 * mformat_only:                          miscellaneous flags.  (line 73)
2462 * MTOOLS_FAT_COMPATIBILITY:              global variables.     (line  6)
2463 * MTOOLS_LOWER_CASE:                     global variables.     (line  6)
2464 * MTOOLS_NO_VFAT:                        global variables.     (line  6)
2465 * MTOOLS_SKIP_CHECK:                     global variables.     (line  6)
2466 * MTOOLSRC:                              Configuration.        (line  9)
2467 * nodelay:                               open flags.           (line  6)
2468 * sectors:                               geometry description. (line 68)
2469 * sync:                                  open flags.           (line  6)
2470 * tracks:                                geometry description. (line 61)
2471 * use_xdf:                               miscellaneous flags.  (line 68)
2472
2473 \1f
2474 File: mtools.info,  Node: Concept Index,  Prev: Variable Index,  Up: Top
2475
2476 Concept index
2477 *************
2478
2479 \0\b[index\0\b]
2480 * Menu:
2481
2482 * 2m:                                    2m.                   (line  6)
2483 * ALPHA patches:                         Location.             (line  6)
2484 * APlaceForYourStuff:                    mzip.                 (line  6)
2485 * Archive bit:                           mattrib.              (line  6)
2486 * Atari:                                 miscellaneous flags.  (line 65)
2487 * Atari Ram disk:                        location information. (line 28)
2488 * Backwards compatibility:               old style configuration.
2489                                                                (line  6)
2490 * Bad blocks:                            mbadblocks.           (line  6)
2491 * bigger sectors:                        bigger sectors.       (line  6)
2492 * blocksize:                             miscellaneous variables.
2493                                                                (line 34)
2494 * bugs:                                  Location.             (line  6)
2495 * Case sensitivity:                      case sensitivity.     (line  6)
2496 * Changing file attributes:              mattrib.              (line  6)
2497 * character devices:                     miscellaneous variables.
2498                                                                (line 34)
2499 * Checking configuration file:           mtoolstest.           (line  6)
2500 * Clusters of a file:                    mshowfat.             (line  6)
2501 * Command list:                          Commands.             (line  6)
2502 * Compile time configuration:            Compiling mtools.     (line  6)
2503 * Compiled-in defaults:                  Porting mtools.       (line  6)
2504 * Concatenating MS-DOS files:            mcopy.                (line  6)
2505 * Configuration file:                    default values.       (line  6)
2506 * Configuration file name:               configuration file location.
2507                                                                (line  6)
2508 * Configuration file name (parsing order): parsing order.      (line  6)
2509 * Configuration file parsing order:      parsing order.        (line  6)
2510 * Configuration file syntax:             general syntax.       (line  6)
2511 * Configuration file, old syntax:        old style configuration.
2512                                                                (line  6)
2513 * Configuration files:                   Configuration.        (line  9)
2514 * Configuration of disk geometry:        geometry description. (line  6)
2515 * Copying an entire disk image:          mcat.                 (line  9)
2516 * Copying MS-DOS files:                  mcopy.                (line  6)
2517 * CR/LF conversions:                     mcopy.                (line  6)
2518 * Creating a directory:                  mmd.                  (line  6)
2519 * Current working directory:             directory.            (line  6)
2520 * Current working directory (changing the): mcd.               (line  6)
2521 * Default configuration:                 default values.       (line  6)
2522 * Default directory:                     directory.            (line  6)
2523 * Default directory (changing the):      mcd.                  (line  6)
2524 * Default values:                        default values.       (line  6)
2525 * Deleting a directory:                  mrd.                  (line  6)
2526 * deleting an MS-DOS directory recursively: mdeltree.          (line  6)
2527 * deleting MS-DOS files:                 mdel.                 (line  6)
2528 * Description of disk geometry:          geometry description. (line  6)
2529 * diffs:                                 Location.             (line  6)
2530 * Directory:                             directory.            (line  6)
2531 * Directory (changing):                  mcd.                  (line  6)
2532 * Directory creation:                    mmd.                  (line  6)
2533 * Directory listing:                     mdir.                 (line  6)
2534 * Directory removing:                    mrd.                  (line  6)
2535 * disable locking:                       miscellaneous flags.  (line 10)
2536 * Disk Geometry:                         geometry description. (line  6)
2537 * Disk image:                            mcat.                 (line  9)
2538 * Disk label:                            mlabel.               (line  6)
2539 * DMF disks:                             more sectors.         (line  6)
2540 * DOSEMU hard disk image:                location information. (line 14)
2541 * Drive configuration:                   per drive variables.  (line  6)
2542 * Drive configuration, example:          general information.  (line  6)
2543 * Drive description:                     per drive variables.  (line  6)
2544 * Drive description, example:            general information.  (line  6)
2545 * Drive independent configuration variables: global variables. (line  6)
2546 * du:                                    mdu.                  (line  6)
2547 * Duplicate file names:                  name clashes.         (line  6)
2548 * Ejecting a Zip/Jaz disk:               mzip.                 (line  6)
2549 * Environmental variables:               global variables.     (line  6)
2550 * Erasing a directory:                   mrd.                  (line  6)
2551 * erasing an MS-DOS directory recursively: mdeltree.           (line  6)
2552 * erasing MS-DOS files:                  mdel.                 (line  6)
2553 * exclusive access to a drive:           open flags.           (line  6)
2554 * Executing commands before opening the device: miscellaneous variables.
2555                                                                (line 28)
2556 * Fat:                                   mshowfat.             (line  6)
2557 * fdformat:                              more sectors.         (line  6)
2558 * File name of device node:              location information. (line 10)
2559 * File system creation:                  mformat.              (line  6)
2560 * Filenames:                             arguments.            (line  6)
2561 * floppyd:                               floppyd.              (line  6)
2562 * Floppyd cat:                           mcat.                 (line  9)
2563 * floppyd_installtest:                   floppyd_installtest.  (line  6)
2564 * Format of disk:                        geometry description. (line  6)
2565 * Formats, high capacity:                high capacity formats.
2566                                                                (line  6)
2567 * Formatting disks:                      mformat.              (line  6)
2568 * FreeDOS:                               global variables.     (line  6)
2569 * getting parameters of a MS-DOS file system: minfo.           (line  6)
2570 * Global configuration variables:        global variables.     (line  6)
2571 * Hdimage:                               location information. (line  6)
2572 * Hidden files:                          mattrib.              (line  6)
2573 * High capacity formats:                 high capacity formats.
2574                                                                (line  6)
2575 * High capacity formats, mounting:       mmount.               (line  6)
2576 * High density disk:                     geometry description. (line  6)
2577 * Image file:                            location information. (line 10)
2578 * Initializing disks:                    mformat.              (line  6)
2579 * Jaz disk (utilities):                  mzip.                 (line  6)
2580 * Jaz disks (partitioning them):         mpartition.           (line  6)
2581 * Jaz disks (partitions):                location information. (line 14)
2582 * Jaz disks (raw SCSI access):           miscellaneous flags.  (line 16)
2583 * Labeling a disk:                       mlabel.               (line  6)
2584 * Linux enhancements (High Capacity Formats): high capacity formats.
2585                                                                (line  6)
2586 * Linux enhancements (mmount):           mmount.               (line  6)
2587 * List of available commands:            Commands.             (line  6)
2588 * Listing a directory:                   mdir.                 (line  6)
2589 * Listing space occupied by directories and files: mdu.        (line  6)
2590 * Location of configuration files:       configuration file location.
2591                                                                (line  6)
2592 * Location of configuration files (parsing order): parsing order.
2593                                                                (line  6)
2594 * locking (disabling it):                miscellaneous flags.  (line 10)
2595 * Long file name:                        long names.           (line  6)
2596 * Low density disk:                      geometry description. (line  6)
2597 * Magneto-optical disks:                 location information. (line 14)
2598 * mailing list:                          Location.             (line  6)
2599 * Making a directory:                    mmd.                  (line  6)
2600 * Marking blocks as bad:                 mbadblocks.           (line  6)
2601 * mattrib:                               mattrib.              (line  6)
2602 * mbadblocks:                            mbadblocks.           (line  6)
2603 * mcat:                                  mcat.                 (line  9)
2604 * mcd:                                   mcd.                  (line  6)
2605 * mcd (introduction):                    directory.            (line  6)
2606 * mclasserase:                           mclasserase.          (line  6)
2607 * mcopy:                                 mcopy.                (line  6)
2608 * Mcwd file:                             mcd.                  (line  6)
2609 * mdel:                                  mdel.                 (line  6)
2610 * mdeltree:                              mdeltree.             (line  6)
2611 * mdir:                                  mdir.                 (line  6)
2612 * mdu:                                   mdu.                  (line  6)
2613 * Memory Card:                           mclasserase.          (line  6)
2614 * mformat:                               mformat.              (line  6)
2615 * mformat (geometry used for):           geometry description. (line  6)
2616 * mformat parameters:                    minfo.                (line  6)
2617 * minfo:                                 minfo.                (line  6)
2618 * mkmanifest:                            mkmanifest.           (line  6)
2619 * mlabel:                                mlabel.               (line  6)
2620 * mmd:                                   mmd.                  (line  6)
2621 * mmount:                                mmount.               (line  6)
2622 * mmove:                                 mmove.                (line  6)
2623 * Mounting a disk:                       mmount.               (line  6)
2624 * Moving files (mmove):                  mmove.                (line  6)
2625 * Moving files (mren):                   mren.                 (line  6)
2626 * mpartition:                            mpartition.           (line  6)
2627 * mrd:                                   mrd.                  (line  6)
2628 * mren:                                  mren.                 (line  6)
2629 * mshortname:                            mshortname.           (line  6)
2630 * mshowfat:                              mshowfat.             (line  6)
2631 * mtoolstest:                            mtoolstest.           (line  6)
2632 * mzip:                                  mzip.                 (line  6)
2633 * Name clashes:                          name clashes.         (line  6)
2634 * Name of configuration files:           configuration file location.
2635                                                                (line  6)
2636 * Name of configuration files (parsing order): parsing order.  (line  6)
2637 * Name of device node:                   location information. (line 10)
2638 * Occupation of space by directories and files: mdu.           (line  6)
2639 * Odd formats:                           high capacity formats.
2640                                                                (line  6)
2641 * Old configuration file syntax:         old style configuration.
2642                                                                (line  6)
2643 * open flags:                            open flags.           (line  6)
2644 * Options:                               arguments.            (line  6)
2645 * OS/2 (layout of removable media):      location information. (line 14)
2646 * OS/2 (XDF disks):                      XDF.                  (line  6)
2647 * Overwriting files:                     name clashes.         (line  6)
2648 * packing list:                          mkmanifest.           (line  6)
2649 * Parsing order:                         parsing order.        (line  6)
2650 * Partitioned image file:                location information. (line 14)
2651 * partitions (creating):                 mpartition.           (line  6)
2652 * password protected Zip disks:          mzip.                 (line  6)
2653 * patches:                               Location.             (line  6)
2654 * Physically erase:                      mclasserase.          (line  6)
2655 * plain floppy: device xxx busy:         miscellaneous flags.  (line 10)
2656 * Porting:                               Porting mtools.       (line  6)
2657 * Primary file name (long names):        long names.           (line  6)
2658 * Primary file name (name clashes):      name clashes.         (line  6)
2659 * Ram disk:                              location information. (line 28)
2660 * raw device:                            miscellaneous variables.
2661                                                                (line 34)
2662 * Read errors:                           mbadblocks.           (line  6)
2663 * Read-only files (changing the attribute): mattrib.           (line  6)
2664 * Read-only files (listing them):        mdir.                 (line  6)
2665 * Reading MS-DOS files:                  mcopy.                (line  6)
2666 * recursively removing an MS-DOS directory: mdeltree.          (line  6)
2667 * remote floppy access <1>:              floppyd_installtest.  (line  6)
2668 * remote floppy access:                  floppyd.              (line  6)
2669 * Removable media:                       location information. (line 14)
2670 * Removing a directory:                  mrd.                  (line  6)
2671 * removing an MS-DOS directory recursively: mdeltree.          (line  6)
2672 * removing MS-DOS files:                 mdel.                 (line  6)
2673 * Renaming files (mmove):                mmove.                (line  6)
2674 * Renaming files (mren):                 mren.                 (line  6)
2675 * SCSI devices:                          miscellaneous flags.  (line 16)
2676 * Secondary file name (long names):      long names.           (line  6)
2677 * Secondary file name (name clashes):    name clashes.         (line  6)
2678 * setgid installation:                   miscellaneous flags.  (line 40)
2679 * setuid installation:                   miscellaneous flags.  (line 40)
2680 * setuid installation (needed for raw SCSI I/O): miscellaneous flags.
2681                                                                (line 16)
2682 * Solaris (compile time configuration of vold): Compiling mtools.
2683                                                                (line  6)
2684 * Solaris (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags.
2685                                                                (line 16)
2686 * Solaris (volcheck):                    miscellaneous variables.
2687                                                                (line 28)
2688 * Solaris (vold):                        miscellaneous flags.  (line 57)
2689 * Space occupied by directories and files: mdu.                (line  6)
2690 * Special formats:                       high capacity formats.
2691                                                                (line  6)
2692 * Subdirectory creation:                 mmd.                  (line  6)
2693 * Subdirectory removing:                 mrd.                  (line  6)
2694 * SunOS (Raw access to SCSI devices such as Zip & Jaz): miscellaneous flags.
2695                                                                (line 16)
2696 * synchronous writing:                   open flags.           (line  6)
2697 * Syntax of the configuration file:      general syntax.       (line  6)
2698 * Syquest disks:                         location information. (line 14)
2699 * Syquest disks (raw SCSI access):       miscellaneous flags.  (line 16)
2700 * System files:                          mattrib.              (line  6)
2701 * Testing configuration file for correctness: mtoolstest.      (line  6)
2702 * Text files:                            mcopy.                (line  6)
2703 * Tools disk (Zip and Jaz drives):       mzip.                 (line  6)
2704 * Verifying configuration file:          mtoolstest.           (line  6)
2705 * VFAT-style file names:                 long names.           (line  6)
2706 * vgacopy:                               more sectors.         (line  6)
2707 * Vold (compile time configuration):     Compiling mtools.     (line  6)
2708 * Vold (mediamgr):                       miscellaneous flags.  (line 57)
2709 * Weird formats:                         high capacity formats.
2710                                                                (line  6)
2711 * Windows 95 (DMF disks):                more sectors.         (line  6)
2712 * Windows 95-style file names:           long names.           (line  6)
2713 * Windows NT (layout of removable media): location information.
2714                                                                (line 14)
2715 * Wordswapped:                           miscellaneous flags.  (line 65)
2716 * Working directory <1>:                 mcd.                  (line  6)
2717 * Working directory:                     directory.            (line  6)
2718 * Write protecting a Zip/Jaz disk:       mzip.                 (line  6)
2719 * Writing MS-DOS files:                  mcopy.                (line  6)
2720 * X terminal <1>:                        floppyd_installtest.  (line  6)
2721 * X terminal:                            floppyd.              (line  6)
2722 * XDF disks:                             XDF.                  (line  6)
2723 * XDF disks (compile time configuration): Compiling mtools.    (line  6)
2724 * XDF disks (how to configure):          miscellaneous flags.  (line 68)
2725 * Zip disk (utilities):                  mzip.                 (line  6)
2726 * Zip disks (partitioning them):         mpartition.           (line  6)
2727 * Zip disks (partitions):                location information. (line 14)
2728 * Zip disks (raw SCSI access):           miscellaneous flags.  (line 16)
2729 * ZipTools disk:                         mzip.                 (line  6)
2730
2731
2732 \1f
2733 Tag Table:
2734 Node: Top\7f873
2735 Node: Location\7f2958
2736 Node: Common features\7f4344
2737 Node: arguments\7f5108
2738 Node: drive letters\7f6762
2739 Node: directory\7f8114
2740 Node: long names\7f8559
2741 Node: name clashes\7f11105
2742 Node: case sensitivity\7f13388
2743 Node: high capacity formats\7f14617
2744 Node: more sectors\7f15736
2745 Node: bigger sectors\7f16785
2746 Node: 2m\7f17507
2747 Node: XDF\7f18686
2748 Node: exit codes\7f20021
2749 Node: bugs\7f20657
2750 Node: Configuration\7f21189
2751 Node: configuration file location\7f22324
2752 Node: general syntax\7f22748
2753 Node: default values\7f23575
2754 Node: global variables\7f24102
2755 Node: per drive variables\7f26183
2756 Node: general information\7f27018
2757 Node: location information\7f27459
2758 Node: geometry description\7f28977
2759 Node: open flags\7f32829
2760 Node: miscellaneous variables\7f33428
2761 Node: miscellaneous flags\7f35496
2762 Node: multiple descriptions\7f39126
2763 Node: parsing order\7f40796
2764 Node: old style configuration\7f41827
2765 Node: Commands\7f42522
2766 Node: floppyd\7f44443
2767 Node: floppyd_installtest\7f49228
2768 Node: mattrib\7f49859
2769 Node: mbadblocks\7f51655
2770 Node: mcat\7f52948
2771 Node: mcd\7f53759
2772 Node: mclasserase\7f54620
2773 Node: mcopy\7f55299
2774 Node: mdel\7f58332
2775 Node: mdeltree\7f58670
2776 Node: mdir\7f59087
2777 Node: mdu\7f60363
2778 Node: mformat\7f60869
2779 Node: mkmanifest\7f67805
2780 Node: minfo\7f69777
2781 Node: mlabel\7f70347
2782 Node: mmd\7f71499
2783 Node: mmount\7f71846
2784 Node: mmove\7f72442
2785 Node: mpartition\7f73248
2786 Node: mrd\7f76769
2787 Node: mren\7f77125
2788 Node: mshortname\7f77872
2789 Node: mshowfat\7f78202
2790 Node: mtoolstest\7f78610
2791 Node: mtype\7f79180
2792 Node: mzip\7f80031
2793 Ref: mzip-Footnote-1\7f82064
2794 Ref: mzip-Footnote-2\7f82145
2795 Node: Compiling mtools\7f82431
2796 Node: Porting mtools\7f83526
2797 Node: Command Index\7f89441
2798 Node: Variable Index\7f89589
2799 Node: Concept Index\7f91120
2800 \1f
2801 End Tag Table