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.
“dired” is short for Directory Edit. It is a old term for file management.
To start viewing directory, called
When in dired, most commands have a single letter key.
Here's the most useful commands:
Sometimes you want to copy or delete many files. You can mark the files, then apply a command on all marked files.
To mark a file, press m. Here's a list of basic marking commands:
|【m】||mark a file|
|【U】||unmark all marked|
|【% m】||mark by pattern (regex)|
For example, if you want to mark all HTML files, type 【% m】, then type
Here are other common dired commands:
|【g】||refresh dir listing|
|【^】||go to parent dir|
dired is often used together with
shell-command 【Alt+!】 or
shell. 〔➤ Emacs: Run Shell in Emacs〕
For complete list of dired commands, call
describe-mode when in dired-mode.
(info "(emacs) Dired")
See: Emacs: Rename Files Interactively.
Emacs Lisp: Open File in External App
dired has many features and options.