In computing, dir
(directory) is a command used for file and directory listing, specifically in the command line interface (CLI) of the operating systems CP/M, DOS, OS/2, Singularity, Microsoft Windows and in the DCL command line interface used on VMS, RT-11 and RSX-11. The command is also supplied with OS/8 as a CUSP (Commonly-Used System Program).
Contents
Sample usage
The following example demonstrates the output of the dir command on Windows 7, without arguments:
Options/Switches
Switches may be present in the DIRCMD environment variable. Override preset switches by prefixing any switch with - (hyphen) -- for example, /-W.
Unices
dir
is not a Unix command, Unix has the analogous ls
command instead. The Linux operating system, however, has a dir
command that "is equivalent to ls -C -b
; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences," as the documentation says.