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