mzip
Compress files to minimize size
SYNOPSIS
mzip [-a] [-d directory] [-l] [-t type] [-v] zipfile [file...]
PARAMETERS
-a
Sets the archive attribute of the extracted files on the target MS-DOS filesystem.
-d directory
Extracts files to the specified directory on the target MS-DOS filesystem. If omitted, files are extracted to the current directory.
-l
Lists the contents of the ZIP archive. This is the default action if no specific files are provided for extraction.
-t type
Sets the specified file attribute for extracted files. Valid types include 's' for system, 'h' for hidden, and 'r' for read-only.
-v
Enables verbose output, listing all files as they are processed during extraction or listing operations.
zipfile
The path to the PKZIP archive file to be processed. This file is expected to be on an MS-DOS filesystem or a disk image.
[file...]
Optional. Specifies particular files within the archive to extract or list. If omitted, all files are processed (either listed or extracted).
DESCRIPTION
mzip is a utility from the mtools package that allows Linux users to interact with PKZIP archives located on MS-DOS filesystems, such as floppy disks or disk images. It is primarily designed to extract files from these archives or list their contents. Unlike the standard zip and unzip commands, mzip is specifically tailored for environments where interaction with MS-DOS specific attributes (like archive, system, hidden, or read-only) is necessary. It provides a convenient way to manage zipped data within an MS-DOS context without needing to mount the filesystem explicitly.
Its functionality is somewhat limited compared to full-fledged zip utilities but serves its niche purpose effectively within the mtools ecosystem, especially for legacy data or specialized system maintenance.
CAVEATS
mzip is part of the mtools package, which is primarily designed for interacting with MS-DOS filesystems. Its utility is highly specialized for this purpose and it is not a general-purpose replacement for zip or unzip for standard Linux archives. It may not fully support all features of modern ZIP archives, especially those created with advanced compression methods or features not compatible with the PKZIP 2.04g standard (which mtools often targets due to its DOS focus). Long file names within ZIP archives extracted to actual MS-DOS filesystems might be truncated or mangled due to DOS naming conventions.
MS-DOS FILESYSTEM CONTEXT
Unlike standard Linux zip utilities, mzip operates within the context of MS-DOS filesystems. This means it often expects to find the zipfile on an MS-DOS drive (e.g., A: or B:) or within an MS-DOS disk image. It can also handle MS-DOS specific file attributes like hidden, system, and read-only, which are less common or handled differently in native Linux filesystems.
HISTORY
The mzip command is an integral component of the mtools suite, a collection of utilities developed to enable Unix/Linux systems to seamlessly interact with MS-DOS filesystems without requiring explicit mounting. Its development began in the early 1990s to address the common need for accessing data on MS-DOS formatted floppy disks. mzip specifically was introduced to handle PKZIP archives prevalent in the MS-DOS era. While its direct usage has diminished with the decline of physical floppy disks and dedicated MS-DOS environments, mtools (and thus mzip) remains valuable for working with disk images, emulators, or legacy systems.