|
In computer software, specifically the command line interface (CLI) of the DOS operating system, dir is a command used for file and directory listing. It is analogous to the Unix ls command. Software, or program, enables a computer to perform specific tasks, as opposed to the physical components of the system (hardware). ...
It has been suggested that this article or section be merged with Command prompt. ...
â¹ The template below has been proposed for deletion. ...
An operating system (OS) is a computer program that manages the hardware and software resources of a computer. ...
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. ...
A computer file is a collection of information that is stored in a computer system and can be identified by its full path name. ...
In computing, a directory, catalog, or folder, is an entity in a file system which can contain a group of files and/or other directories. ...
Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®) is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
LS may refer to: .ls, the Internet top-level domain for Lesotho Jet2. ...
dir has existed as a DOS command since the initial release of MS-DOS. It is built in to the DOS command shell; in contrast, ls is a standalone program. Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
DIR displays a list of files and subdirectories in a directory. Syntax
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4] Explanation [drive:][path][filename] Specifies drive, directory, and/or files to list. Examples C:>dir help.txt Shows if the file exists on drive C: C:>dir windows Shows the content of the folder Windows if it is located in C: C:>dir d:windows Shows the content of the folder d:Windows if it exists In Windows XP, dir checks for switches in the %dircmd% environment variable.
Options Particular implementations of the DOS operating system may provide more options; these are only the most common. /w : Wide list format /p : Pause at every page /s : Also look in subdirectories /a[xx] : Display files with the specified attributes (options may be combined, such as /arh, to show read-only, hidden files) /o[xx] : Modifies sort order (options may be combined, such as /ons, to sort name first then size) Attribute options: There are very few or no other articles that link to this one. ...
/aa : Display files with Archive attribute /ar : Display files with Read-Only attribute /as : Display files with System attribute /ah : Display files with Hidden attribute /a-a : Display files without Archive attribute /a-r : Display files without Read-Only attribute /a-s : Display files without System attribute /a-h : Display files without Hidden attribute Sorting options: /on : Sort on Name order /od : Sort on Date order /oe : Sort on Extension order /og : Sort on Directory order /os : Sort on Size order /o-n : Reverse Sort on Name order /o-d : Reverse Sort on Date order /o-e : Reverse Sort on Extension order /o-g : Reverse Sort on Directory order /o-s : Reverse Sort on Size order Output There are several output types. dir : Displays the content of drive C: on the screen. dir > sample.txt : Creates a text file called sample.txt containing the content of drive C: dir >> sample.txt : Appends the content of drive C: to the existing file sample.txt dir > lpt1 : Prints the content of drive C: onto the printer connected to LPT1 More commands dir d: Displays the content of drive D: dir d: /a /s : Displays the content of drive D: including hidden files and sub folders dir, : Displays the content of the current directory including hidden files and sub folders (this functionality has been broken in recent versions of Windows). dir /? : Shows help for the dir command Sample listing This sample is taken from a Windows XP implementation of the MS-DOS CLI. Windows XP is a line of proprietary operating systems developed by Microsoft for use on general-purpose computer systems, including home and business desktops, notebook computers, and media centers. ...
Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
It has been suggested that this article or section be merged with Command prompt. ...
C:>dir Volume in drive C is Eduard Laguit Volume Serial Number is 2326-30E6 Directory of C: 11/17/2001 09:40p 257,787 INF000.SWP 04/16/2002 10:12p 446 VIRUSLOG.TXT 05/19/2002 04:34p <DIR> filelib 11/22/2001 05:17p 228 BOOT.BAD 11/22/2001 05:10p 1,663 MSDOS.BAD 12/09/2001 09:07a 8,681 SCANDISK.LOG 11/22/2001 05:40p 1,775 MSDOS.SYS 01/03/2002 12:05a <DIR> eBooks 11/22/2001 04:59p 185 BOOT.w98 11/22/2001 05:12p 253 BOOT.w2k 03/08/2002 02:08p <DIR> WINNT 11/22/2001 02:17p <DIR> GamesofEduard 11/17/2001 10:04p <DIR> Documents and Settings 05/12/2002 05:57p <DIR> dostemp 10/14/2001 09:51a <DIR> Downloads 08/01/2002 07:15p 160 AUTOEXEC.BAT 12/09/2001 05:24p <DIR> Backup 10/14/2001 09:25a <DIR> MSDOS7 09/30/2002 03:48p <DIR> cygwin 11/25/2002 03:02a <DIR> My Documents 03/08/2002 02:45p <DIR> Program Files 03/31/2002 07:41p <DIR> Temp 9 File(s) 2,674,060 bytes 16 Dir(s) 2,672,476,160 bytes free |