1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-15 09:15:45 +02:00
tldr/pages/windows/dir.md
akhilennu 2eaf3bb790
dir: add sort example (#17469)
* Update dir.md, Added sort by size, date, name, etc.

* Update dir.md

* Update dir.md
2025-08-05 07:48:10 +03:00

28 lines
584 B
Markdown

# dir
> List directory contents.
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/dir>.
- Show the contents of the current directory:
`dir`
- Show the contents of a given directory:
`dir {{path\to\directory}}`
- Show the contents of the current directory, including hidden ones:
`dir /a`
- Show the contents of a given directory, including hidden ones:
`dir {{path\to\directory}} /a`
- Show a bare list of directories and files, with no additional information:
`dir /b`
- Sort results by date/time, oldest first:
`dir /o:d`