Dir (DOS command)
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. In Unix, dir is a symbolic link to or an alias for the ls command.
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.
Syntax
- dir <options> <filelist>
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 only
- /o[xx] : Modifies sort order
Sample listing
This sample is taken from a Windows 2000 implementation of the MS-DOS CLI.
C:\>dir
Volume in drive C is MAIN W2K
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> Games
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
This article is a stub. You can help BambooWeb by .