dir (command)

In computing, dir (directory) is a command used for computer file and directory listing.[1]

The SpartaDOS X DIR command
The SpartaDOS X DIR command
Developer(s)DEC, Digital Research, Intel, Microsoft, IBM, ICD, Inc.
Operating systemCP/M, MP/M, ISIS-II, TRIPOS, DOS, 4690 OS, OS/2, Microsoft Windows, Singularity, ReactOS, AROS, VMS, RT-11, RSX-11, OS/8


Dir command in Windows Command Prompt
Screenshot of a Microsoft Windows Command Prompt window showing a directory listing.

The command is available in the command-line interface (CLI) of the operating systems CP/M,[2] MP/M,[3] ISIS-II,[4] TRIPOS,[5] DOS, 4690 OS,[6] OS/2, Microsoft Windows, Singularity, ReactOS, AROS,[7] and in the DCL command line interface used on VMS, RT-11 and RSX-11. It is also supplied with OS/8 as a CUSP (Commonly-Used System Program) and available in the open source MS-DOS emulator DOSBox.

The numerical computing environments MATLAB and GNU Octave include a dir function with similar functionality.[8][9]


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".[10]

See also


  1. ^ https://archive.org/details/1988-rugheimer-spanik-amigados-quick-reference
  2. ^ http://www.cpm.z80.de/manuals/cpm22-m.pdf
  3. ^ Digital Research (1981-09-25). MP/M-86 Operating System - User's Guide (PDF) (1 ed.). Pacific Grove, CA, USA: Digital Research. Archived (PDF) from the original on 2017-01-04. Retrieved 2017-01-04.
  4. ^ ISIS II Users Guide
  5. ^ https://www.pagetable.com/docs/amigados_tripos/tripos_manuals.pdf
  6. ^ https://archive.org/details/4690OSV6r2UsersGuide/page/n169
  7. ^ http://aros.sourceforge.net/documentation/users/shell/index.php
  8. ^ https://www.mathworks.com/help/matlab/ref/dir.html
  9. ^ https://octave.sourceforge.io/octave/function/dir.html
  10. ^ dir invocation (GNU coreutils) at www.gnu.org

External links


In computing, ATTRIB is a command in ISIS-II, DOS, OS/2, Microsoft Windows and ReactOS that allows the user to change various characteristics, or "attributes" of a computer file or directory. The command is also available in the EFI shell.

Alabama (computer virus)

Alabama is a computer virus, discovered October 1989 on the campus of Hebrew University in Jerusalem.


AmigaDOS is the disk operating system of the AmigaOS, which includes file systems, file and directory manipulation, the command-line interface, and file redirection.

In AmigaOS 1.x, AmigaDOS is based on a TRIPOS port by MetaComCo, written in BCPL. BCPL does not use native pointers, so the more advanced functionality of the operating system was difficult to use and error-prone. The third-party AmigaDOS Resource Project (ARP, formerly the AmigaDOS Replacement Project), a project begun by Amiga developer Charlie Heath, replaced many of the BCPL utilities with smaller, more sophisticated equivalents written in C and assembler, and provided a wrapper library, arp.library. This eliminated the interfacing problems in applications by automatically performing conversions from native pointers (such as those used by C or assembler) to BCPL equivalents and vice versa for all AmigaDOS functions.

From AmigaOS 2.x onwards, AmigaDOS was rewritten in C, retaining 1.x compatibility where possible. Starting with AmigaOS 4, AmigaDOS abandoned its legacy with BCPL. Starting from AmigaOS 4.1, AmigaDOS has been extended with 64-bit file-access support.


The backslash (\) is a typographical mark used mainly in computing and is the mirror image of the common slash (/). It is sometimes called a hack, whack, escape (from C/UNIX), reverse slash, slosh, downwhack, backslant, backwhack, bash, reverse slant, and reversed virgule. In Unicode and ASCII it is encoded at U+005C \ REVERSE SOLIDUS (92decimal).

Cd (command)

The cd command, also known as chdir (change directory), is a command-line OS shell command used to change the current working directory in operating systems such as Unix, DOS, OS/2, TRIPOS, AmigaOS (where if a bare path is given, cd is implied), Microsoft Windows, ReactOS, and Linux. It can be used in shell scripts and batch files. The command is also available in the open source MS-DOS emulator DOSBox and in the EFI shell. The command is named chdir in MPE/iX.The system call that affects the command in most operating systems is chdir that is defined by POSIX.

The command is analogous to the OpenVOS change_current_dir command.

Directory (OpenVMS command)

In computer software, specifically the command line interface of the OpenVMS operating system, the DIRECTORY command (often abbreviated as DIR) is used to list the files inside a directory. It is analogous to the DOS dir and Unix ls commands.

Directory (computing)

In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers, directories are known as folders, or drawers, analogous to a workbench or the traditional office filing cabinet.

Files are organized by storing related files in the same directory. In a hierarchical file system (that is, one in which files and directories are organized in a manner that resembles a tree), a directory contained inside another directory is called a subdirectory. The terms parent and child are often used to describe the relationship between a subdirectory and the directory in which it is cataloged, the latter being the parent. The top-most directory in such a filesystem, which does not have a parent of its own, is called the root directory.

Environment variable

An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer.

They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP environment variable to discover a suitable location to store temporary files, or the HOME or USERPROFILE variable to find the directory structure owned by the user running the process.

They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and macOS. From PC DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows, and OS/2 also have included them as a feature, although with somewhat different syntax, usage and standard variable names.

Fork (file system)

In a computer file system, a fork is a set of data associated with a file-system object. File systems without forks only allow a single set of data for the contents, while file systems with forks allow multiple such contents. Every non-empty file must have at least one fork, often of default type, and depending on the file system, a file may have one or more other associated forks, which in turn may contain primary data integral to the file, or just metadata.

Unlike extended attributes, a similar file system feature which is typically of fixed size, forks can be of variable size, possibly even larger than the file's primary data fork. The size of a file is the sum of the sizes of each fork.

Glob (programming)

In computer programming, glob patterns specify sets of filenames with wildcard characters. For example, the Unix Bash shell command mv *.txt textfiles/ moves (mv) all files with names ending in .txt from the current directory to the directory textfiles. Here, * is a wildcard standing for "any string of characters" and *.txt is a glob pattern. The other common wildcard is the question mark (?), which stands for one character.

List of DOS commands

This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list.

In DOS, many standard system commands were provided for common tasks such as listing files on a disk or moving files. Some commands were built into the command interpreter, others existed as external commands on disk. Over the several generations of DOS, commands were added for the additional functions of the operating system. In the current Microsoft Windows operating system, a text-mode command prompt window, cmd.exe, can still be used.


In computing, ls is a command to list computer files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification. When invoked without any arguments, ls lists the files in the current working directory. The command is also available in the EFI shell. In other environments, such as DOS, OS/2, and Microsoft Windows, similar functionality is provided by the dir command. The numerical computing environments MATLAB and GNU Octave include an ls

function with similar functionality.


The mkdir (make directory) command in the Unix, DOS, FlexOS, OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory. It is also available in the EFI shell and in the PHP scripting language. In DOS, OS/2, Windows and ReactOS, the command is often abbreviated to md.

The command is analogous to the OpenVOS create_dir command. TRIPOS and AmigaDOS provide a similar MakeDir command to create new directories. The numerical computing environments MATLAB and GNU Octave include an mkdir

function with similar functionality.

More (command)

In computing, more is a command to view (but not modify) the contents of a text file one screen at a time.

It is available on Unix and Unix-like systems, DOS, FlexOS, 4690 OS, OS/2, Microsoft Windows and ReactOS. Programs of this sort are called pagers. more is a very basic pager, originally allowing only forward navigation through a file, though newer implementations do allow for limited backward movement.


NTFS (New Technology File System) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family.NTFS has several technical improvements over the file systems that it superseded – File Allocation Table (FAT) and High Performance File System (HPFS) – such as improved support for metadata and advanced data structures to improve performance, reliability, and disk space use. Additional extensions are a more elaborate security system based on access control lists (ACLs) and file system journaling.

NTFS is supported in other desktop and server operating systems as well. Linux and BSD have a free and open-source NTFS driver, called NTFS-3G, with both read and write functionality. macOS comes with read-only support for NTFS; its disabled-by-default write support for NTFS is unstable.

Path (computing)

A path, the general form of the name of a file or directory, specifies a unique location in a file system. A path points to a file system location by following the directory tree hierarchy expressed in a string of characters in which path components, separated by a delimiting character, represent each directory. The delimiting character is most commonly the slash ("/"), the backslash character ("\"), or colon (":"), though some operating systems may use a different delimiter. Paths are used extensively in computer science to represent the directory/file relationships common in modern operating systems, and are essential in the construction of Uniform Resource Locators (URLs). Resources can be represented by either absolute or relative paths.

Quick Menu

Quick Menu is a graphical user interface for MS-DOS developed by OSCS Software Development, Inc.. Three versions were made: Quick Menu, Quick Menu II and Quick Menu III.In DOS users have to type all commands via the keyboard. By using the cd-command users could navigate through (sub)directories. The dir-command is used to retrieve all files in the current folder. The user had to search for the main startup file. This could be a EXE file, a COM file or a Batch file. An additional issue was that the directory could contain more of such files so it was sometimes unclear which was the main startup file. Normally, the correct startup command was in the manual or in a text file but the user had to remember the folder location and name of this main file.

Quick Menu offered a solution: it is a graphical user environment in which the user could create his own menustructure. In each menu a submenu or some kind of shortcut could be created. In such shortcuts the user had to define the location of the main startup file. Of course, the user had to create the shortcut manually and had to link it with the main startup file once. As from then he easily could navigate through the menu and select the program he wanted to launch.

Windows 1.0

Windows 1.0 is a graphical personal computer operating environment developed by Microsoft. Microsoft had worked with Apple Computer to develop applications for Apple's January 1984 original Macintosh, the first mass-produced personal computer with a graphical user interface (GUI) that enabled users to see user friendly icons on screen. Windows 1.0 was released on November 20, 1985, as the first version of the Microsoft Windows line. It runs as a graphical, 16-bit multi-tasking shell on top of an existing MS-DOS installation. It provides an environment which can run graphical programs designed for Windows, as well as existing MS-DOS software. Its development was spearheaded by the company founder Bill Gates after he saw a demonstration of a similar software suite known as Visi On at COMDEX.

Despite positive responses to its early presentations and support from a number of hardware and software makers, Windows 1.0 was received poorly by critics. Critics felt Windows 1.0 did not meet their expectations. In particular, they felt that Windows 1.0 put too much emphasis on mouse input at a time when mouse use was not yet widespread; not providing enough resources for new users; and for performance issues, especially on systems with lower computer hardware specifications. Despite these criticisms, Windows 1.0 was an important milestone for Microsoft, as it introduced the Microsoft Windows line. Windows 1.0 was declared obsolete and Microsoft stopped providing support and updates for the system on December 31, 2001.

File system navigation
File management
Disk management
User environment
File contents
Maintenance and care
Boot management
Software development

This page is based on a Wikipedia article written by authors (here).
Text is available under the CC BY-SA 3.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.