UNIX/LINUX Command – mtools

March 2, 2019



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.

Satish Kumar

Satish Kumar

I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.

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…] [USER@]HOST:SRC… [DEST]Push: rsync [OPTION…] SRC… [USER@]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...



Submit a Comment

Your email address will not be published. Required fields are marked *

13 − 2 =

News & Updates

Join Our Newsletter