Emacs: File Manager, dired

By Xah Lee. Date: . Last updated: .

Emacs is a excellent tool for file management. For example, list files, copy/delete, rename, moving files, create/delete directory. Once you become familiar with it, you almost never go to shell or the OS desktop for these tasks.

emacs dired
M-x dired. emacs's feature for file management.

“dired” is short for Directory Edit. It is a old term for file management.

{Copy, Delete, Rename} File

To start viewing directory, called dired.

When in dired, most commands have a single letter key.

emacs dired menu 2015-10
emacs dired “Operate” menu

Here's the most useful commands:

Mark/Unmark Multiple Files

Sometimes you want to copy or delete many files. You can mark the files, then apply a command on all marked files.

dired mark menu
dired mark menu

To mark a file, press m.

Here's a list of basic marking commands:

For example, if you want to mark all HTML files, type 【% m】, then type \.html$.

Dired Navigation

Here are other common dired commands:

dired is often used together with shell-commandAlt+!】 or shell. [see Emacs: Run Shell in Emacs]

For complete list of dired commands, Alt+x describe-mode when in dired-mode.

(info "(emacs) Dired")

Dired Topic

  1. File Manager, dired
  2. Dired Customization
  3. Find Replace Text in Directory
  4. Batch Rename Files
  5. Dired Sort File by Time, Size
  6. Open File in External App
  7. Rename File from Space to Hyphen/Underscore
  8. Convert Image Files in Dired

File Topic

  1. File Manager, dired
  2. Emacs Bookmark
  3. Open Recently Opened
  4. Open File Fast
  5. Open Last Closed File
  6. Open File Path Under Cursor
  7. Open File in External App

If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard: Best Keyboards for Emacs


Emacs Lisp