dir (command)

dir (command)

In computing, dir (directory) is a command used for file and directory listing, specifically in the command line interface (CLI) of the RT-11, CP/M, VMS, DOS, OS/2, Singularity and Microsoft Windows operating systems. It is analogous to the Unix ls command.

Because it is the primary means of displaying the files and directories on disk or other storage medium within a command window, the dir command is one of the most basic commands employed by users of the command line interface to MS-DOS and various versions of Windows.[1]

The dir command has existed as a DOS command since the initial release of MS-DOS. It is built into the DOS command shell, and is not provided as a separate standalone program.

In DOS and Microsoft Windows, dir checks for switches in the %dircmd% environment variable.

In Windows PowerShell, dir is a predefined command alias for the Get-ChildItem Cmdlet which basically serves the same purpose.

Sample usage

The following example demonstrates the output of the dir command on Windows 7, given no- and one argument(s):

C:\Users\Public\Pictures\Sample Pictures>dir
 Volume in drive C is System
 Volume Serial Number is C8D0-76E2

 Directory of C:\Users\Public\Pictures\Sample Pictures

14-07-2009  06:41    <DIR>          .
14-07-2009  06:41    <DIR>          ..
14-07-2009  06:52           879,394 Chrysanthemum.jpg
14-07-2009  06:52           845,941 Desert.jpg
14-07-2009  06:52           595,284 Hydrangeas.jpg
14-07-2009  06:52           775,702 Jellyfish.jpg
14-07-2009  06:52           780,831 Koala.jpg
14-07-2009  06:52           561,276 Lighthouse.jpg
14-07-2009  06:52           777,835 Penguins.jpg
14-07-2009  06:52           620,888 Tulips.jpg
               8 File(s)      5,837,151 bytes
               2 Dir(s)  57,925,980,160 bytes free

C:\Users\Public\Pictures\Sample Pictures>dir /w
 Volume in drive C is System
 Volume Serial Number is C8D0-76E2

 Directory of C:\Users\Public\Pictures\Sample Pictures

[.]                 [..]                Chrysanthemum.jpg   Desert.jpg          Hydrangeas.jpg      Jellyfish.jpg
Koala.jpg           Lighthouse.jpg      Penguins.jpg        Tulips.jpg
               8 File(s)      5,837,151 bytes
               2 Dir(s)  57,925,992,448 bytes free

C:\Users\Public\Pictures\Sample Pictures>

See also

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Dir (command) — In computing, dir (directory) is a command used for file and directory listing, specifically in the command line interface (CLI) of the RT 11, CP/M, VMS, DOS, OS/2 and Windows operating systems. It is analogous to the Unix ls command.Because it… …   Wikipedia

  • COMMAND.COM — Developer(s) Seattle Computer Products, Microsoft Corporation, IBM, Novell and several others. Operating system DR DOS, FreeDOS, MS DOS, Novell DOS, OpenDOS, PC DOS, PTS DOS, ROM DOS, 86 DOS, Microsoft Windows (Windows 95 Wi …   Wikipedia

  • Dir — Contents 1 Acronyms 2 In computing 3 Places and areas 4 Peo …   Wikipedia

  • Command.com — Saltar a navegación, búsqueda command.com es el nombre del intérprete de comandos para DOS y versiones de Windows de 16/32bits (95/98/98 SE/Me). Al ser el primer programa que se ejecuta después del inicio, posee también el rol de la configuración …   Wikipedia Español

  • command.com — Desarrollador Seattle Computer Products, Microsoft Corporation, IBM, Novell y otros Información general Género Shell …   Wikipedia Español

  • Command.com — Le programme COMMAND.COM est l interpréteur de commandes du système MS DOS. On ne le confondra pas avec cmd.exe, qui est l interpréteur de commande de Windows NT (Windows 2000, Windows XP...) et d OS/2. Les commandes de cmd.exe sont inspirées,… …   Wikipédia en Français

  • Dir (comando de DOS) — Saltar a navegación, búsqueda Comando del sistema operativo DOS, de la Interfaz de línea de comandos (command line interface o CLI en inglés). dir es un comando usado para mostrar un listado de archivos y directorios. Es análogo al comando de… …   Wikipedia Español

  • Command & Conquer: Generals — Command Conquer: Generals Entwickler: Electronic Arts Verleger: Electronic Arts Publikation …   Deutsch Wikipedia

  • Command & Conquer: Generäle — Command Conquer: Generals Entwickler: Electronic Arts Verleger: Electronic Arts Publikation …   Deutsch Wikipedia

  • Command & Conquer: Generäle — Command Conquer: Generals Entwickler Electronic Arts Publisher …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”