Home » Linux Command Reference » UNIX/LINUX Command – mtools

UNIX/LINUX Command – mtools


mtools—A collection of tools for manipulating MS-DOS files


The mtools are
mattrib—Change MS-DOS file attribute flags
mbadblocks—Test a floppy disk, and mark the bad blocks in the FAT
mcd—Change MS-DOS directory
mcopy—Copy MS-DOS files to/from UNIX
mdel—Delete an MS-DOS file
mdir—Display an MS-DOS directory
mformat—Add an MS-DOS filesystem to a low-level formatted floppy disk
mlabel—Make an MS-DOS volume label
mmd—Make an MS-DOS subdirectory
mmount—Mount an MS-DOS disk
mrd—Remove an MS-DOS subdirectory
mmove—Move or rename an MS-DOS file or subdirectory
mren—Rename an existing MS-DOS file
mtype—Display contents of an MS-DOS file
mtest—Test and display the configuration


mtools is a public domain collection of programs to allow UNIX systems to read, write, and manipulate files on an MS-DOS filesystem (typically a floppy disk). Where reasonable, each program attempts to emulate the MS-DOS equivalent command.

However, unnecessary restrictions and oddities of DOS are not emulated. For instance, it is possible to move subdirectories from one subdirectory to another.

MS-DOS filenames are optionally composed of a drive letter followed by a colon, a subdirectory, and a filename. Filenames without a drive letter refer to UNIX files. Subdirectory names can use either the / or \ separator. The use of the \ separator or wildcards will require the names to be enclosed in quotes to protect them from the shell. (Note: Wildcards in UNIX filenames should not be enclosed in quotes, because here users want the shell to expand them.)


The regular expression “pattern matching” routines follow the UNIX-style rules. For example, * matches all MS-DOS files in lieu of *.*. The archive, hidden, read-only, and system attribute bits are ignored during pattern matching.

All options use the – (minus) flag, not / as you’d expect in MS-DOS.

Most mtools commands allow multiple filename parameters, which doesn’t follow MS-DOS conventions, but which is more user friendly.


The mcd command is used to establish the device and the current working directory (relative to the MS-DOS filesystem); otherwise, the default is assumed to be A:/. However, unlike MS-DOS, there is only one working directory, and not one per drive.

Related Posts

UNIX/LINUX Command – rsync

UNIX/LINUX Command – rsync

NAME rsync – a fast, versatile, remote (and local) file-copying tool rsync Command SYNOPSIS Local: rsync [OPTION…] SRC… [DEST] Access via remote shell:Pull: rsync [OPTION…] [[email protected]]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [[email protected]]HOST:DEST Access via rsync...

UNIX/LINUX Command – strip

UNIX/LINUX Command – strip

NAME strip—Discard symbols from object files. SYNOPSIS strip [ -Fbfdname|–target=bfdname ] [ -Ibfdname|–input-target=bfdname ] [ -Obfdname|–output-target=bfdname ] [-Rsectionname|–remove-section=sectionname ] [ -s|–strip-all ] [-S|-g|–strip-debug ][-x|–discard-all...

UNIX/LINUX Command – expand

UNIX/LINUX Command – expand

NAME expand—Convert tabs to spaces SYNOPSIS expand [–tab1[,tab2[,…]]] [–t tab1[,tab2[,…]]] [–i] [—tabs=tab1[,tab2[,…]]] [–initial] [–help] [–version] [file…] DESCRIPTION This manual page documents the GNU version of expand. expand writes the contents of each given...

UNIX/LINUX Command – uuencode

UNIX/LINUX Command – uuencode

NAME uuencode—Encode a binary fileuudecode—Decode a file created by uuencode SYNOPSIS uuencode [-m] [ file ] nameuudecode [-o outfile] [ file ]… DESCRIPTION uuencode and uudecode are used to transmit binary files over transmission mediums that do not support other...

Follow Us

Our Communities

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!



Submit a Comment

Your email address will not be published.

fourteen − 10 =