mmd
Create new directories
SYNOPSIS
mmd [-vD-/s] msdosdirectory [msdosdirectory...]
PARAMETERS
msdosdirectory
The target MS-DOS path(s) and name(s) for the new directory or directories to be created. Multiple directory paths can be specified as arguments.
-v
Provide verbose output, showing details of the operation as it progresses.
-D
Delete the existing directory if it already exists before creating a new one. This option forces recreation.
-/
Use the forward slash (/) as the path separator instead of the backslash (\) for MS-DOS paths. This option is useful for specifying MS-DOS paths in a Unix-like manner.
-s
Treat the current directory as the root of a FAT filesystem. This option is mostly useful for creating a FAT filesystem within a disk image, acting as a shortcut for combining mformat and mmd actions.
DESCRIPTION
mmd is a command-line utility from the mtools package, designed to create new subdirectories on an MS-DOS filesystem. This command is particularly useful when working with floppy disks, disk images, or partitions formatted with FAT (File Allocation Table) filesystems, common in older DOS/Windows environments. It allows Linux users to manage MS-DOS directory structures directly without needing to mount the filesystem explicitly.
mmd ensures that the newly created directory conforms to the 8.3 filename convention and other FAT filesystem rules. It's an essential tool for preparing MS-DOS boot disks, organizing files on vintage systems, or handling disk images containing legacy software. The command operates on a specified MS-DOS path, which can include drive letters or relative paths within the mtools configuration. It mimics the functionality of the DOS `MD` or `MKDIR` command.
CAVEATS
mmd is part of the mtools suite, which primarily handles FAT filesystems. It does not work with modern Linux filesystems like Ext4 or XFS directly. Users must be aware of MS-DOS filename conventions (e.g., 8.3 format) and directory structure limitations when using this command. Incorrect usage with disk images can lead to data corruption if the image is not a valid FAT filesystem or if operations are performed on a mounted filesystem that is not managed by mtools.
HISTORY
The mmd command is an integral part of the mtools software package, which originated to provide Unix-like systems with tools for interacting with MS-DOS filesystems. mtools was developed to bridge the gap between Unix and DOS environments, allowing users to read, write, and manage files on floppy disks and other media formatted for MS-DOS without needing to mount them directly. mmd specifically addresses the need to create directories, mimicking the functionality of DOS's MD or MKDIR command. Its development parallels the widespread use of DOS and FAT filesystems, making it a critical utility for maintaining compatibility and managing data across different operating systems, especially for legacy systems and archives.