You are on page 1of 1

Dired Reference Card Commands on Files Marked or Specified

(based on Dired in GNU Emacs 25) by the Prefix


Commands marked with (DX) require dired-x
copy file(s) C
rename a file or move files to another directory R
Entering and Exiting Dired change ownership of file(s) O
change the group of the file(s) G
run dired C-x d change mode of file(s) M
dired the directory of the file you are editing C-x C-j (DX) print file(s) P
quit dired q convert filename(s) to lower case % l
convert filename(s) to upper case % u
Motion Commands delete marked (as opposed to flagged) file(s) D
compress or uncompress file(s) Z
move up to previous line p run info on file I (DX)
move down to next line n make symbolic link(s) S
move up to previous directory line < make relative symbolic link(s) Y
move down to next directory line > make hard link(s) H
move to next marked file M-} search files for a regular expression A
move to previous marked file M-{ regexp query replace on marked files Q
move up to previous subdirectory M-C-p byte-compile file(s) B
move down to next subdirectory M-C-n load file(s) L
move to parent directory ^ shell command on file(s) !
move to first child subdirectory M-C-d asynchronous shell command on file(s) &

Mouse Commands Flagging Files for Deletion


Unmark commands remove delete flags
visit file or directory Mouse_Button_2
flag file for deletion d
flag all backup files (file names ending in ˜) ~
Immediate Actions on Files flag all auto-save files #
flag various intermediate files % &
visit current file f flag numeric backups (ending in .˜1˜, .˜2˜, etc.) .
view current file v execute the deletions requested (flagged files) x
visit current file in other window o flag files matching a regular expression % d
create a new subdirectory +
compare file at point with the one at mark =
Regular Expression Commands
Marking and Unmarking Files mark filenames matching a regular expression % m
copy marked files by regexp % C
mark a file or subdirectory for later commands m rename marked files by regexp % R
unmark a file or all files of a subdirectory u hardlink % H
unmark all marked files in a buffer M-delete symlink % S
mark files with a given extension * . symlink, with relative paths % Y
mark all directories * / mark for deletion % d
mark all symlinks * @
mark all executables * *
invert marking t
Dired and Find
mark all files in the current subdir * s
dired file(s) whose name matches a pattern M-x find-name-dired
mark file names matching a regular expression * %
dired file(s) that contain pattern M-x find-grep-dired
change the marks to a different character * c
dired file(s) based on find output M-x find-dired
mark files for which Elisp expression returns t * ( (DX)

Modifying the Dired Buffer Getting Help


dired help h
insert a subdirectory into this buffer i
dired summary (short help) and error log ?
remove marked files from the listing k
remove a subdir listing C-u k
re-read all directories (retains all marks) g
toggle sorting of current subdir by name/date s Copyright c 2017 Free Software Foundation, Inc.
edit ls switches C-u s For GNU Emacs version 25
Originally written May 2000 by Evgeny Roubinchtein,
recover marks, hidden lines, and such (undo) C-_ using refcard layout designed by Stephen Gildea.
hide all subdirectories M-$
Released under the terms of the GNU General Public License version 3 or
hide or unhide subdirectory $ later.

For more Emacs documentation, and the TEX source for this card, see the
Emacs distribution, or http://www.gnu.org/software/emacs

You might also like