@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000
+@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Dired, Calendar/Diary, Rmail, Top
Emacs commands to move around in this buffer, and special Dired commands
to operate on the files listed.
+ The Dired buffer is ``read-only,'' and inserting text in it is not
+useful, so ordinary printing characters such as @kbd{d} and @kbd{x} are
+used for special Dired commands. Some Dired commands @dfn{mark} or
+@dfn{flag} the @dfn{current file} (that is, the file on the current
+line); other commands operate on the marked files or on the flagged
+files.
+
The Dired-X package provides various extra features for Dired mode.
@xref{Dired-X,,,dired-x, Dired Extra Version 2 User's Manual}.
@menu
* Enter: Dired Enter. How to invoke Dired.
-* Commands: Dired Commands. Commands in the Dired buffer.
+* Navigation: Dired Navigation. Special motion commands in the Dired buffer.
* Deletion: Dired Deletion. Deleting files with Dired.
* Flagging Many Files:: Flagging files based on their names.
* Visit: Dired Visiting. Other file operations through Dired.
of @kbd{C-x d}. @kbd{C-x 5 d} (@code{dired-other-frame}) uses a
separate frame to display the Dired buffer.
-@node Dired Commands
-@section Commands in the Dired Buffer
-
- The Dired buffer is ``read-only,'' and inserting text in it is not
-useful, so ordinary printing characters such as @kbd{d} and @kbd{x} are
-used for special Dired commands. Some Dired commands @dfn{mark} or
-@dfn{flag} the @dfn{current file} (that is, the file on the current
-line); other commands operate on the marked files or on the flagged
-files.
+@node Dired Navigation
+@section Navigation in the Dired Buffer
@kindex C-n @r{(Dired)}
@kindex C-p @r{(Dired)}
so common in Dired that it deserves to be easy to type.) @key{DEL}
(move up and unflag) is often useful simply for moving up.
+ Some additional navigation commands are available when the Dired
+buffer includes several directories. @xref{Subdirectory Motion}.
+
@node Dired Deletion
@section Deleting Files with Dired
@cindex flagging files (in Dired)
@cindex deleting files (in Dired)
- The primary use of Dired is to @dfn{flag} files for deletion and then
-delete the files previously flagged.
+ One of the most frequent uses of Dired is to first @dfn{flag} files for
+deletion, then delete the files that were flagged.
@table @kbd
@item d
so that repeated @kbd{d} commands flag successive files. A numeric
argument serves as a repeat count.
+@cindex recursive deletion
@vindex dired-recursive-deletes
The variable @code{dired-recursive-deletes} controls whether the
delete command will delete non-empty directories (including their
@samp{.rej} files produced by @code{patch}.
@kindex # @r{(Dired)}
-@kindex ~ @r{(Dired)}
@findex dired-flag-auto-save-files
-@findex dired-flag-backup-files
@cindex deleting auto-save files
@kbd{#} (@code{dired-flag-auto-save-files}) flags for deletion all
files whose names look like auto-save files (@pxref{Auto Save})---that
-is, files whose names begin and end with @samp{#}. @kbd{~}
-(@code{dired-flag-backup-files}) flags for deletion all files whose
-names say they are backup files (@pxref{Backup})---that is, whose names
-end in @samp{~}.
+is, files whose names begin and end with @samp{#}.
+
+@kindex ~ @r{(Dired)}
+@findex dired-flag-backup-files
+ @kbd{~} (@code{dired-flag-backup-files}) flags for deletion all files
+whose names say they are backup files (@pxref{Backup})---that is, files
+whose names end in @samp{~}.
@kindex . @r{(Dired)}
@vindex dired-kept-versions
and supplying that file name (@code{dired-find-file}). @xref{Visiting}.
@item @key{RET}
+@itemx e
@kindex RET @r{(Dired)}
+@kindex e @r{(Dired)}
Equivalent to @kbd{f}.
@item a
Viewing a file is like visiting it, but is slanted toward moving around
in the file conveniently and does not allow changing the file.
@xref{Misc File Ops,View File, Miscellaneous File Operations}.
+
+@item ^
+@kindex ^ @r{(Dired)}
+@findex dired-up-directory
+Visit the parent directory of the current directory
+(@code{dired-up-directory}). This is more convenient than moving to
+the parent directory's line and typing @kbd{f} there.
@end table
@node Marks vs Flags
@findex dired-undo
Undo changes in the Dired buffer, such as adding or removing
marks (@code{dired-undo}). @emph{This command does not revert the
-actual file operations, nor recovers lost files!} It just undoes
+actual file operations, nor recover lost files!} It just undoes
changes in the buffer itself. For example, if used after renaming one
or more files, @code{dired-undo} restores the original names, which
will get the Dired buffer out of sync with the actual contents of the
as that of the old file.
@vindex dired-recursive-copies
+@cindex recursive copying
The variable @code{dired-recursive-copies} controls whether
directories are copied recursively. The default is to not copy
recursively, which means that directories cannot be copied.
@findex locate-with-filter
@cindex file database (locate)
@vindex locate-command
- @kbd{M-x locate} provides a similar interface to the @code{locate}.
-@kbd{M-x locate-with-filter} is similar, but keeps only lines matching
-a given regular expression.
+ @kbd{M-x locate} provides a similar interface to the @code{locate}
+program. @kbd{M-x locate-with-filter} is similar, but keeps only lines
+matching a given regular expression.
@vindex find-ls-option
The format of listing produced by these commands is controlled by the