Emacs is a excellent tool for file management. For example, listing files, copy/delete files, rename files, moving files, creating/deleting directory. Once you become familiar with it, you almost never go back 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
Here's a list of basic commands:
|【Enter ↵】||Open the file|
|【q】||Close the dir|
|【+】||create a new dir|
|【Z】||compress/decompress the file by gzip|
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 in together with
shell-command 【Alt+!】 or
shell. 〔➤ Emacs Shell Tutorial (Bash, cmd.exe, PowerShell)〕
For complete list of dired commands, call
(info "(emacs) Dired")
See: Emacs: Rename Files Interactively.
For more dired tips, see:
Emacs Lisp: Open File in External App