redetho logo

Documentation about EMACS' dired Mode

dired is EMACS built-in tool to work with directories and files. It resembles the "commander" like tools which go beyond the command line, but are not graphical in a modern sense. You will find that dired is immensely powerful.

To enter dired-mode do

C-x d directory <RET>


M-x dired

Searching files

When the files are all in the same directory or in not too many sub-directories:

Navigating the directory tree

Move up one directory (this opens a new dired buffer):


Enter a directory without opening a new buffer (in contrast to "f" oder RET):


Move a file or a whole directory:


use the up- or down-arrow in EMACS' mini-buffer to select a target path; paths in other EMACS windows will feature.

Do dired of the directory of the file you are currently editing:

M-x dired-jump

Manually input a path (like CD xyz):

C-x d

Adapting the View

Toggling sorting between date and name:


Toggling detailed and terse view:


Get two "panes" (EMACS windows):

M-x split-window-horizontally

Alias of split-window-right

Menu-bar -> File -> new-window-on-right


C-x 3

Switch between windows ("other" window):

C-x o 

To go back to one pane only:

C-x 1


Listing a directory via FTP:


The :/directory/ part seems to be mandatory

To copy the dired path to the clipboard, move the cursor to top dired window line (i.e. the one with the path):


The path will end with a slash. Note: also under MS Windows this will yield forward slashes. However, the Windows tools accept paths with forward slashes too.

My dired Customisations

I customised dired-listing-switches to "-Al")

On Windows, dired is using a Lisp emulation of ls. My preferences:

Combining dired with speedbar

speedbar is EMACS built-in tool to explore directory trees, like you it in various graphical user interfaces. You start speedbar with

M-x speedbar

The speedbar is bound to the active frame and lives in its own frame.

speedbar can be used togethe with dired. C-x d works in a speedbar frame as well. It offers to dired speedbar's "current" directory. However, that directory is the one shown at the top of the speedbar frame, not something in the tree that you might have opened below. In other words: you need to go down to the wanted directory and use RET to make it current. BTW: U (shift-u) sets speedbar's current directory "up" one level.

Last change: 2022-03-13
© 2002-2022 Dr. Thomas Redelberger