Next: Editing in Dired Prev: Dired Up: Dired
To invoke Dired, do `C-x d' or `M-x dired'. The command reads a
directory name or wildcard file name pattern as a minibuffer argument
just like the `list-directory' command, `C-x C-d'. Invoking Dired with
a prefix argument lets you enter the listing switches for the directory.
Dired assumes you meant to use a wildcard if the last component of
the name is not an existing file. Note that only the last pathname
component may contain wildcards. With wildcards it uses the shell to do
the filename globbing, whereas usually it calls `ls' directly. Because
of this, you might have to quote characters that are special to the
shell. For example, to dired all auto-save files in your `~/mail/'
directory, use `~/mail/\#*' as argument to Dired. Note the backslash
needed to quote `#' (at the beginning of a word) to the shell.
Where `dired' differs from `list-directory' is in naming the buffer
after the directory name or the wildcard pattern used for the listing,
and putting the buffer into Dired mode so that the special commands of
Dired are available in it. The variable `dired-listing-switches' is a
string used as an argument to `ls' in making the directory; this string
must contain `-l'. Most other switches are also allowed, especially
`-F', `-i' and `-s'. For the `-F' switch to work you may have to set
the variable `dired-ls-F-marks-symlinks', depending on what kind of
`ls' program you are using. Note: Dired Configuration.
When a Dired buffer for the given directory already exists, it is
simply selected without refreshing it. You can type `g' if you suspect
it is out of date.
To display the Dired buffer in another window rather than in the
selected window, use `C-x 4 d' (`dired-other-window)' instead of `C-x
automatically generated by info2www