To invoke Dired, type C-x d (
dired). This reads a
directory name using the minibuffer, and opens a Dired buffer
listing the files in that directory. You can also supply a wildcard
file name pattern as the minibuffer argument, in which case the Dired
buffer lists all files matching that pattern. The usual history and
completion commands can be used in the minibuffer; in particular,
M-n puts the name of the visited file (if any) in the minibuffer
(see Minibuffer History).
You can also invoke Dired by giving C-x C-f (
a directory name.
dired-listing-switches specifies the options to
ls for listing the directory; this string must
contain ‘-l’. If you use a prefix argument with the
command, you can specify the
ls switches with the minibuffer
before you enter the directory specification. No matter how they are
ls switches can include short options (that is,
single characters) requiring no arguments, and long options (starting
with ‘--’) whose arguments are specified with ‘=’.
On MS-Windows and MS-DOS systems, Emacs emulates
see ls in Lisp, for options and peculiarities of that emulation.
To display the Dired buffer in another window rather than in the
selected window, use C-x 4 d (
of C-x d. C-x 5 d (
dired-other-frame) uses a
separate frame to display the Dired buffer.