You can define two types of dired: flat and recursive. For instance:
(defun op-i:dired (rec) "customized dired: will display directory recursively when called with an argument" (interactive "P") (let ((dir (car (find-file-read-args "Dired: " nil))) (opts (if rec (read-string "options: " "-lhAR") "-lhA"))) (if (file-directory-p dir) (dired dir opts)))) (define-key (current-global-map) (kbd "Cx Cd") 'op-i:dired)
Then the call of this function with Cu Cx Cd will be displayed recursively, and with Cx Cd will be executed as usual.
After displaying recursive recursively, you can also delete backups or do other things recursively.
source share