English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

The Linux mdir command

Linux Command Manual

The Linux mdir command is used to display MS-DOS directory.

mdir is a command in mtools, simulating MS-DOS dir command can display MS-Directory content in DOS file system.

Syntax

mdir [-afwx/][Directory]

Parameters:

  • -/ Displays all subdirectories and files under the directory.
  • -a  Displays hidden files.
  • -f  Does not display the remaining available space on the disk.
  • -w  Displays only the names of directories or files, presented in a horizontal manner to display more directories or files at once.
  • -X  Displays the full path of all subdirectories and files under the directory, without displaying other information.

Online Examples

Display content of disk a

$ mdir -/ a:\*   

After executing the above commands, mdir will display all subdirectories and files in the specified disk "a:\" as follows:

Volume in drive A has no label  #Loading information  
Volume Serial Number is 13D2~055C  
Directory for A:\                   #Below is directory information  
./TEST <DIR> 2011-08-23 16:59     
#Display format is filename, 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              #Remaining Space  

Linux Command Manual