Linux mdir Command
The Linux mdir command is used to display MS-DOS directories.
mdir is a command in the mtools utility suite that emulates the dir command of MS-DOS, showing the contents of directories in the MS-DOS file system.
Syntax
mdir [-afwx/][directory]
Parameters:
-/ Display all subdirectories and files in the directory.
-a Display hidden files.
-f Do not show the remaining available space on the disk.
-w Only display the names of directories or files, presented in a horizontal layout to show more directories or files at once.
-X Only display the full paths of all subdirectories and files, without showing other information.
Example
Display the contents of drive a:
$ mdir -/ a:\*
After executing the above command, mdir will display all subdirectories and their file information in the specified drive "a:\", as shown below:
Volume in drive A has no label # Load information
Volume Serial Number is 13D2~055C
Directory for A:\ # Directory information
./TEST <DIR> 2011-08-23 16:59
# Display format: file name, directory size, modification time
AUTORUN.INF 265 2011-08-23 16:53
AUTORUN.BAT 43 2011-08-23 16:56
3 files 308 bytes # Total size
724 325 bytes free # Free space