# -+- number -+- category -+- title -+- email -+- name -+- homepage -+- clickOnName -+- language -+- image -+- browser-used -+- security-cookie
=0 -+- 2000-02-15:1 -+- UNIX Basics -+- Mtools -+- guido.s@writeme.com -+- Guido Socher -+- http://www.oche.de/~bearix/g -+- nolink -+- English -+- 2000-02-15:1.gif -+- Mozilla/4.7 [en] (X11; I; Linux 2.2.10 i586; Nav) -+- 3850
mtools is a collection of programs to access ms-dos files on
floppy disks without mounting them. You can read dos floppy disks
in Linux by mounting them somewhere but mtools are usually easier and
faster to use. An advantage is also that the floppy does not need to be
mounted because accidentally ejecting a mounted floppy under Linux can be
quite fatal.
Using mtools
mtools work basically like msdos commands. The command names are identical with
the corresponding msdos command except that a "m" is prepended.
Mtools understand also long file names.
The most important commands are:
Make sure that the device /dev/fd0 is writable for you before you use
them. You many make the /dev/fd0 device writable for everybody. To do that
log in as root and type "chmod 666 /dev/fd0".
To get a directory listing of the floppy in /dev/fd0 (drive a:) you type:
mdir a:
Note the device specifier. It is "a:" and not the normal
Linux name /dev/fd0.
To copy the files a.txt and b.txt to the floppy you use:
mcopy a.txt b.txt a:
To copy all files (not directories) from the floppy to your current
directory you use:
mcopy "a:*" .
Note the quotes. They are important because you want the star to go
to the mcopy command and avoid that it gets expanded by the shell.
To delete all files that have a filename which starts with a "x" you
type:
mdel "a:x*"
Again remember to put quotes.
To remove all files from the floppy you can use mformat
mformat a:
The mtools are included in almost every distribution. If they are not
yet installed then install them from cdrom.
Otherwise mtools are available from
http://www.tux.org/pub/tux/knaff/mtools/index.html