dir (command line command)
dir is a command line command that outputs the contents of directories ( dir ectories ) on a storage medium . Among other things, it is used in the DOS , Windows , OS / 2 , RT-11 , CP / M , VMS or Singularity operating systems . Due to its importance for finding one's way around a command line at all, it is one of the best known of all, along with cd .
MS-DOS and Windows
DIR
- usually case-insensitive in MS-DOS and Windows - was included in Tim Paterson's 86-DOS and is one of the seven command line commands that have been available since the first edition of MS-DOS .
parameter
All parameters are optional, which means that a simple input of is DIR
sufficient to issue the command. In this case, default values are automatically used for the parameters. It is also possible to define standard values for the dir parameters yourself via the environment variable %dircmd%
, which are then automatically appended each time the command is used.
The following parameters are currently supported by the dir command:
parameter | meaning |
---|---|
/ A | Lists elements with corresponding attributes / AA = about a rchivierende files |
/ B | Lists only the files and directories, without a heading or summary |
/ C | Sets a thousands separator for the file size |
/ D | Output as a multi-column list, sorted by column |
/ L | Output in lower case |
/ N | "New long-list" format. Displays the file names right-aligned. |
/O | Output is sorted according to the criterion: / OD = after D ate |
/ P | Displays the output page by page. |
/ Q | Shows the owner of a file |
/ R | Shows alternative data stream of a file. |
/ S | Shows all subdirectories as well as the current directory. |
/ T | Defines which time information is to be output ( Windows NT only ) / TC = time of creation of a file or folder |
/ W | Output as a multi-column list, sorted by series |
/ X | Displays the short name of a file, if available (Windows NT only). |
/ 4 | Displays the year in four digits (e.g. 1994 instead of 94 ) |
Other command line interpreters
The DIR
command was in CP / M available. The dir command also exists under Powershell as a command alias that refers to the Get-ChildItem command . On Unix / Linux , the command ls is used instead of dir to output files and directories.
Individual evidence
- ↑ MS-DOS top 10 commands (English) - Computer Hope ; 2016
- ↑ DOS 1.0 and 1.1 (English) - OS / 2 Museum ; 2014
- ↑ Using the Get-ChildItem cmdlet. Microsoft Technet ; Retrieved on June 19, 2013.