mtools is a set of UNIX tools which facilitate access to DOS and Windows floppy disks on our SPARC systems in the UNIX lab. In essence, the floppy disk can be queried and files can be copied back and forth between the floppy and a UNIX user account, all via a set of Unix tools which simulate the DOS command set.
First, the mtools package must be added. This is done via the addpkg system, by running the command addpkg mtools, logging out, and logging back in. To see a listing of all the available mtools commands, type mtools at the command line. Output such as the following should be listed:
Supported commands: mattrib, mbadblocks, mcd, mcopy, mdel, mdeltree, mdir, mformat minfo, mlabel, mmd, mmount, mpartition, mrd, mread, mmove mren, mtoolstest, mtype, mwrite, mzipMost of the listed command correspond to well known DOS commands, such as attrib, cd, copy, etc., and behave similarly.
Some commands, such as mcopy, can take as arguments file names for files which may reside on both the floppy or the UNIX file system. In the former case, the file must be prefixed with the drive name and path, such as a:/foo/bar.txt. In the latter, a normal UNIX path should be specified, such as foo.txt or foo/bar.txt.
A brief and incomplete list of commands will be given here:
mcd a:
mcd a:/foo
mcd a:/foo/bar
mcopy a:foo.txt . # copy foo.txt from floppy to UNIX
mcopy foo.txt a:bar.txt # from UNIX onto floppy
mcopy foo1.txt foo2.txt # from UNIX to UNIX
mcopy a:foo1.txt a:foo2.txt # from floppy onto floppy
mdel a:foo.txt
mmd foo
mmd foo/bar
mdir
mdir a:/foo
mdir a:/foo/bar
mren foo.txt bar.txt
mtype a:foo.txt # on the floppy
mtype foo.txt # on UNIX
Users are encouraged to read the mtools manual page, by typing man mtools at the command prompt. Further help can be obtained by emailing CS tutors at tutors@cs.pdx.edu or joining our chat channel, #cschat on irc.cat.pdx.edu.