Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Dir (command)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Examples== [[File:Commodore C128 CPM Screenshot 2 full.jpg|200px|thumb|right|[[CP/M 3.0]] directory listing on a [[Commodore 128]] home computer.]] [[File:Robotron1715SCREEN.gif|200px|thumb|right|Directory listing on [[Single User Control Program|SCP]] running on a [[VEB Robotron|robotron]] [[PC 1715]].]] [[File:J Elwro 804 Junior.JPG|200px|thumb|right|Directory listing on [[CP/J 2.21]] running on an [[Elwro 804 Junior]].]] [[File:Dir command in Windows Command Prompt.png|200px|thumb|right|[[Microsoft Windows]] [[cmd.exe|Command Prompt]] showing a directory listing.]] ===DOS, Windows, ReactOS=== List all files and directories in the current [[working directory]]. {{sxhl|2=doscon|C:\Users>dir}} List any [[text file]]s and [[batch file]]s ([[filename extension]] ".txt" or ".bat"). {{sxhl|2=doscon|C:\Users>dir *.txt *.bat}} [[Recursion (computer science)|Recursively]] list all files and directories in the specified directory and any subdirectories, in wide format, pausing after each screen of output. The directory name is enclosed in [[Quotation mark|double-quotes]], to prevent it from being interpreted is as two separate [[command-line option]]s because it contains a [[whitespace character]]. {{sxhl|2=doscon|C:\Users>dir /s /w /p "C:\Users\johndoe\My Documents"}} List any [[NTFS junction point]]s: {{pre| {{codett|2=doscon|C:\Users>dir /ash}} {{codett|2=output|Volume in drive C is OS.}} {{codett|2=output|Volume Serial Number is xxxx-xxxx}} {{codett|2=output|Directory of C:\Users}} {{codett|2=output|12/07/2019 02:30 AM <SYMLINKD> All Users [C:\ProgramData]}} {{codett|2=output|12/07/2019 02:30 AM <JUNCTION> Default User [C:\Users\Default]}} {{codett|2=output|12/07/2019 02:12 AM 174 desktop.ini}} {{codett|2=output|1 File(s) 174 bytes}} {{codett|2=output|2 Dir(s) 332,659,789,824 bytes free}} }} ===Unix=== Traditionally, [[Unix]] and [[Unix-like]] systems use the {{code|ls}} command for the needs that <code>dir</code> satisfies. But, the [[GNU#GNU as an operating system|GNU operating system]], has a <code>dir</code> command that "is equivalent to <code>ls -C -b</code>; that is, by default files are listed in columns, sorted vertically, and special characters are represented by backslash escape sequences".<ref>[//www.gnu.org/software/coreutils/manual/html_node/dir-invocation.html dir invocation] (GNU coreutils) at www.gnu.org</ref> Actually, for compatibility reasons, {{code|ls}} produces device-dependent output. The <code>dir</code> command, on the other hand, produces device-independent output.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Dir (command)
(section)
Add topic